object SwerveKinematics
Swerve drive kinematic equations.
fun robotToModuleAccelerationVectors(robotPoseAcceleration: Pose2d, trackWidth: Double, wheelBase: Double = trackWidth): List<Vector2d>
Computes the acceleration vectors corresponding to robotPoseAcceleration given the provided trackWidth and wheelBase. |
|
fun robotToModuleAngularVelocities(robotPoseVelocity: Pose2d, robotPoseAcceleration: Pose2d, trackWidth: Double, wheelBase: Double = trackWidth): List<Double>
Computes the module angular velocities corresponding to robotPoseAcceleration given the provided trackWidth and wheelBase. |
|
fun robotToModuleOrientations(robotPoseVelocity: Pose2d, trackWidth: Double, wheelBase: Double = trackWidth): List<Double>
Computes the module orientations (in radians) corresponding to robotPoseVelocity given the provided trackWidth and wheelBase. |
|
fun robotToModuleVelocityVectors(robotPoseVelocity: Pose2d, trackWidth: Double, wheelBase: Double = trackWidth): List<Vector2d>
Computes the wheel velocity vectors corresponding to robotPoseVelocity given the provided trackWidth and wheelBase. |
|
fun robotToWheelAccelerations(robotPoseVelocity: Pose2d, robotPoseAcceleration: Pose2d, trackWidth: Double, wheelBase: Double = trackWidth): List<Double>
Computes the wheel accelerations corresponding to robotPoseAcceleration given the provided trackWidth and wheelBase. |
|
fun robotToWheelVelocities(robotPoseVelocity: Pose2d, trackWidth: Double, wheelBase: Double = trackWidth): List<Double>
Computes the wheel velocities corresponding to robotPoseVelocity given the provided trackWidth and wheelBase. |
|
fun wheelToRobotVelocities(wheelVelocities: List<Double>, moduleOrientations: List<Double>, trackWidth: Double, wheelBase: Double = trackWidth): Pose2d
Computes the robot velocities corresponding to wheelVelocities, moduleOrientations, and the drive parameters. |