After rebuilding our control system onto our competition bot, we started noticing some strange values from our pigeon 2.0, thus causing our swerves to wig out. The yaw value is a 5 digit number that constantly changes, even when the robot isn’t moving (image is self test snapshot after doing calibration). We’ve reflashed it with the 22.6.2.2 firmware. There were no major issues when moving hardware from the practice bot to the competition bot, it did not undergo any significant impacts or drops or mechanical stressors.
We had this issue and it would begin rapidly decrementing or incrementing, we reset to factory default and everything was perfect again, no reason why it happened, and it’s frustrating, but that fixed it when we had that issue. If it doesn’t work let me know and I can share other things we did before that to try to fix the issue that may help you.
Usually this happens if the compass has been enabled in the config settings (it is off by default).
Using the compass requires magnetometer calibration - if this is missing and compass is enabled then the non-calibrated compass value is fused into your yaw, causing numbers like what you’re seeing.
The compass/magnetometer isn’t really useful in FRC because of the environment of the robot so we recommend leaving it off. If it has been turned on, changing the specific config again or just doing a factory default will both work to turn off the compass.
We plugged in our spare pigeon and ran the roll calibration routine, things seemed to start working again. I do not believe we enabled the compass, but I will double check. What is the routine for factory resetting the whole device? It would be nice to know for the future.
Thanks.