core / com.acmerobotics.roadrunner.kinematics / MecanumKinematics / robotToWheelAccelerations

robotToWheelAccelerations

@JvmStatic @JvmOverloads fun robotToWheelAccelerations(robotAccel: Pose2d, trackWidth: Double, wheelBase: Double = trackWidth, lateralMultiplier: Double = 1.0): List<Double> (source)

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

Parameters

robotAccel - acceleration of the robot in its reference frame

trackWidth - lateral distance between pairs of wheels on different sides of the robot

wheelBase - distance between pairs of wheels on the same side of the robot

lateralMultiplier - multiplicative gain to adjust for systematic, proportional lateral error (gain greater than 1.0 corresponds to overcompensation).