SwerveModuleState
This class represents the state of a single swerve module, encapsulating its speed and direction (angle).
Methods
SwerveModuleState(double speed, Angle direction)
Constructs a new SwerveModuleState with the specified speed and direction.
speed: The speed of the swerve module's drive wheel.direction: TheAnglerepresenting the direction the swerve module is facing.
speed()
Returns the speed of the swerve module.
direction()
Returns the Angle representing the direction of the swerve module.
add(SwerveModuleState state)
Returns a new SwerveModuleState by adding the speed and direction of the provided state to this module's state. The angles are added using Angle.add().