object TankKinematics
Tank drive kinematic equations based upon the unicycle model. All wheel positions and velocities are given in (left, right) tuples. Robot poses are specified in a coordinate system with positive x pointing forward, positive y pointing left, and positive heading measured counter-clockwise from the x-axis.
This page gives a motivated derivation.
fun robotToWheelAccelerations(robotAccel: Pose2d, trackWidth: Double): List<Double>
Computes the wheel accelerations corresponding to robotAccel given trackWidth. |
|
fun robotToWheelVelocities(robotVel: Pose2d, trackWidth: Double): List<Double>
Computes the wheel velocities corresponding to robotVel given trackWidth. |
|
fun wheelToRobotVelocities(wheelVelocities: List<Double>, trackWidth: Double): Pose2d
Computes the robot velocity corresponding to wheelVelocities and the given drive parameters. |