Pose estimation and field-oriented drive

Right on, that was the original question, “would it make sense to attempt to reset the gyro angle with the angle from the pose estimator.” I’m thinking with 2022’s pose estimator, the answer is yes.

Our team will be using a NavX2 or a Pigeon 2 for the gyro, so I am not overly worried about drift. I’m more worried about initial robot placement. At this point, I’m thinking reset the gyro during auto to correct for initial robot placement and then maybe a button for the operator to manually reset the gyro. I’ll put a pin in this one until kickoff.

I tried adding a heading bias state and recomputing the gyro offset from vision measurements. Neither option passes tests at the moment: Add heading bias state to pose estimators to correct IMU heading drift · Issue #4427 · wpilibsuite/allwpilib · GitHub

By the way, the wheel positions in the pose estimator are used as is; we don’t compute deltas for them because the measurement model expresses wheel positions directly.

2 Likes

@calcmogul It looks like 2023 beta-5 makes improvements here. I haven’t tried it, but am I reading correctly that the pose estimator should now do a better job handling drift and correcting for inaccurate initial robot placement.

1 Like

Yep.

3 Likes

I tried it out tonight and it seems to work really well. Thanks!

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.