Closed Dopp-IO closed 1 month ago
The code looks good to me. Probably should have asked about this more in depth earlier, but what is the expected behavior of this system? It looks on first glance like it will always prioritize the upper sensor even if it is decided that the state of the encoder is marginal or the sensors exceed the divergence. Is that expected behavior? Our upper sensor is definitely more precise, but not as accurate to the position of the wheels as the bottom sensor because of the steering slop, and I feel like we should prioritize the bottom sensor if we have decided that the encoder is marginal.
The purpose of the steering system as I see it is to gauge driver intent. The upper steering sensor is a better measure of intent than the lower sensor since there's no slop or u-joint. Even when the upper steering sensor is "marginal", the angle it measures will be accurate, just a little less precise. Even in this marginal state, it will significantly outperform the lower sensor.
Yeah, that makes sense to me
Added steering test cases to cover all expected operating modes. Fixed case where if primary sensor was AWOL and secondary sensor was clamped, system would take 0 degree report from the error'd primary senesor.