File-By-File
SwerveState

SwerveState

This class represents the complete state of a swerve drive chassis, encompassing the individual states of its four swerve modules: front-right, front-left, back-right, and back-left.

Methods

SwerveState(SwerveModuleState frontRight, SwerveModuleState frontLeft, SwerveModuleState backRight, SwerveModuleState backLeft)

Constructs a new SwerveState with the specified states for each of the four swerve modules.

  • frontRight: The SwerveModuleState for the front-right module.
  • frontLeft: The SwerveModuleState for the front-left module.
  • backRight: The SwerveModuleState for the back-right module.
  • backLeft: The SwerveModuleState for the back-left module.

frontRight()

Returns the SwerveModuleState of the front-right swerve module.

frontLeft()

Returns the SwerveModuleState of the front-left swerve module.

backRight()

Returns the SwerveModuleState of the back-right swerve module.

backLeft()

Returns the SwerveModuleState of the back-left swerve module.