Class SwerveArcOdometry


public final class SwerveArcOdometry extends SwerveDriveOdometry
Swerve drive odometry implementation that integrates wheel motion using circular arc geometry rather than straight-line approximations.

Inspired by Team 1690, this odometry model treats each swerve module's motion between updates as an arc defined by the change in wheel angle and distance traveled. This more accurately represents real swerve motion, especially during simultaneous translation and rotation, where straight-line assumptions can introduce measurable integration error.

Compared to SwerveDriveOdometry, which assumes each module travels in a straight line over a timestep, this class:

  • Computes per-module displacement along a circular arc
  • Transforms those displacements into the field frame
  • Averages the resulting module displacements to update the robot pose

The robot heading is still sourced directly from the gyro, while translation is derived purely from module motion.

This class is intended as a drop-in replacement for SwerveDriveOdometry when improved accuracy is desired at the cost of slightly increased computation.