Swerve odometry

Hello, my team is trying to improve robot odometry so bumps in the field (like the cable bump) will not create a deviation in our odometry and will cause our autonomous to not work.
what do you recommend to decrease the deviation?

Your best option is to use AprilTags.

Here is an AprilTag presentation on YouTube I gave recently at Jumpstart.

4 Likes

There are some features out there like CTRE’s pro sync feature

but the WPILIB developers even say it is going to drift eventually. Need to ‘fuse’ the odometry data with april tag data (pose estimation) to correct the errors

Using Pose Estimation with AprilTags and Odometry with Encoders and the IMU does this. Most examples have you set it up in this way. Pose Estimators — FIRST Robotics Competition documentation

You can also filter your odometry. A 4 wheel swerve drive is over-constrained when you calculate odometry. That means there is no exact answer. You technically could locate the center of your robot by looking at just 1 wheel angle, gyro angle, and encoder.

With 4 of those, you have some unique opportunities. You can filter the answers with the highest deviation. You could filter those that had wheel speeds outside the norm. You could average, or perform even fancier statistical analysis. You can drop modules out if they’re broken.

We used the average method because we’re lazy. It worked darn well.

2 Likes

Wow. I was looking for this answer for a long time! Thank you. I could understand how tank odometry works but swerve I didn’t understand until you just said it.

Yep. You can make it complicated or really really simple.

We just sum total X displacement of all 4 wheels and divide by 4, and sum total y displacement of all 4 wheels and divide by 4.

2 Likes

Although this will improve the accuracy of your module states used for odometry, it won’t help when you catch air over the cable bump, or when another robot pushes you sideways.

yeah true. I reread the original post and realize now OP specifically meant over bumps

1 Like

I might be remembering wrong but I think 1690 had some sort of pose correction in 2022 that could calculate the robot position even after being bumped. I think it used the middle hoop to help calculate location based on distance and angle of the rim using their turret. With the removal of retroreflective tape, apriltags are the new way of doing that.

Outside of AprilTags and what not:

  • Ensure your wheel diameter is correct. USE CALIPERS! Make sure to account for tread squishines.
  • Precisely measure your wheel base and track width
  • Go slower around bumps (we ended up going ~50% over bumps compared to 75% normally)

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