core / com.acmerobotics.roadrunner.drive / MecanumKinematics

MecanumKinematics

object MecanumKinematics

Mecanum drive kinematic equations. Ether's paper provides a derivation.

Functions

robotToWheelAccelerations

fun robotToWheelAccelerations(robotPoseAcceleration: Pose2d, trackWidth: Double, wheelBase: Double = trackWidth): List<Double>

Computes the wheel accelerations corresponding to robotPoseAcceleration given the provided trackWidth and wheelBase.

robotToWheelVelocities

fun robotToWheelVelocities(robotPoseVelocity: Pose2d, trackWidth: Double, wheelBase: Double = trackWidth): List<Double>

Computes the wheel velocities corresponding to robotPoseVelocity given the provided trackWidth and wheelBase.

wheelToRobotVelocities

fun wheelToRobotVelocities(wheelVelocities: List<Double>, trackWidth: Double, wheelBase: Double = trackWidth): Pose2d

Computes the robot velocity corresponding to wheelVelocities and the given drive parameters.