core / com.acmerobotics.roadrunner.kinematics / SwerveKinematics / wheelToRobotVelocities

wheelToRobotVelocities

@JvmStatic @JvmOverloads fun wheelToRobotVelocities(wheelVelocities: List<Double>, moduleOrientations: List<Double>, trackWidth: Double, wheelBase: Double = trackWidth): Pose2d (source)

Computes the robot velocities corresponding to wheelVelocities, moduleOrientations, and the drive parameters.

Parameters

wheelVelocities - wheel velocities (or wheel position deltas)

moduleOrientations - wheel orientations (in radians)

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