Is swerve odometry in centimeters?

With swerve odometry class, it looks like when we call the getCurrentPosition method, we’re getting the position of the robot in centimeters. However, all of the values we are giving the odometry class to update in meters per second. The code we’re using to get the bot’s position is [here] (
The code were using to update the odometry is [here] (

All the WPILib geometry and kinematics classes expect SI units. I would recommend sticking with SI units unless you want to do all the dimensional analysis and potentially confuse yourself.

Have any teams used the SwerveDriveOdometry class from WPILib and confirmed that it works? When further investigating the outputs, it doesn’t even look like we’re getting centimeters.
A couple other things to note are we have our max speed set to 3.66 m/s, and we’re calling SwerveDriveKinematics.normalizeWheelSpeeds() before we pass the swerve module states into the swerve module class.

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