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

wheelToRobotVelocities

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

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

Parameters

wheelVelocities - wheel velocities (or wheel position deltas)

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).