Tonight during shop testing, we saw some pretty bad accuracy immediately after crossing the bump. I suspect that the wheel freespin while midair caused us to have massively wrong odometry for a second, which took a few seconds to be corrected by vision.
Ideas to fix this:
- Detect certain conditions that cause odometry to be bad and set a flag that puts our full trust in vision. This will give us a very noisy pose estimate for a short period of time, but it will prevent our pose estimate from shooting potentially multiple meters off the field.
- Add a residual calculator to see how good our current pose estimate is:
For the last 5 vision measurements, sum up their differences from the current pose estimate. These estimates should roughly cancel each other out and the resultant vector should have a tiny magnitude. If the magnitude of this residual is too high, it means that all of our vision measurements are on one side of our pose estimate, indicating that our pose estimate is wrong.
Code changes:
Tonight during shop testing, we saw some pretty bad accuracy immediately after crossing the bump. I suspect that the wheel freespin while midair caused us to have massively wrong odometry for a second, which took a few seconds to be corrected by vision.
Ideas to fix this:
For the last 5 vision measurements, sum up their differences from the current pose estimate. These estimates should roughly cancel each other out and the resultant vector should have a tiny magnitude. If the magnitude of this residual is too high, it means that all of our vision measurements are on one side of our pose estimate, indicating that our pose estimate is wrong.
Code changes: