core / com.acmerobotics.roadrunner.drive / SwerveKinematics / robotToModuleVelocityVectors

robotToModuleVelocityVectors

@JvmStatic @JvmOverloads 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.

Parameters

robotPoseVelocity - velocity 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