SwerveModuleOdometry
This class provides odometry data for a single swerve module. It encapsulates the suppliers for the module's speed and angle, allowing for easy retrieval of its current state.
Methods
SwerveModuleOdometry(Supplier<Double> getSpeed, Supplier<Angle> getAngle)
Constructs a new SwerveModuleOdometry instance.
getSpeed: ASupplier<Double>that provides the current speed of the swerve module's drive wheel.getAngle: ASupplier<Angle>that provides the current angle of the swerve module.
getSpeed()
Returns the current speed of the swerve module, obtained from the getSpeed supplier.
getAngle()
Returns the current angle of the swerve module, obtained from the getAngle supplier.
getState()
Returns a SwerveModuleState object representing the current speed and angle of the swerve module.