public class MecanumKinematics
Mecanum drive kinematic equations. All wheel positions and velocities are given starting with front left and proceeding counter-clockwise (i.e., front left, rear left, rear right, front right). 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 paper provides a motivated derivation.
Modifier and Type | Field and Description |
---|---|
static MecanumKinematics |
INSTANCE
Mecanum drive kinematic equations. All wheel positions and velocities are given starting with front left and
proceeding counter-clockwise (i.e., front left, rear left, rear right, front right). 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.
|
Modifier and Type | Method and Description |
---|---|
static java.util.List<java.lang.Double> |
robotToWheelAccelerations(Pose2d robotAccel,
double trackWidth,
double wheelBase)
Computes the wheel accelerations corresponding to
robotAccel given the provided trackWidth and
wheelBase . |
static java.util.List<java.lang.Double> |
robotToWheelAccelerations(Pose2d robotAccel,
double trackWidth)
Computes the wheel accelerations corresponding to
robotAccel given the provided trackWidth and
wheelBase . |
static java.util.List<java.lang.Double> |
robotToWheelVelocities(Pose2d robotVel,
double trackWidth,
double wheelBase)
Computes the wheel velocities corresponding to
robotVel given the provided trackWidth and
wheelBase . |
static java.util.List<java.lang.Double> |
robotToWheelVelocities(Pose2d robotVel,
double trackWidth)
Computes the wheel velocities corresponding to
robotVel given the provided trackWidth and
wheelBase . |
static Pose2d |
wheelToRobotVelocities(java.util.List<java.lang.Double> wheelVelocities,
double trackWidth,
double wheelBase)
Computes the robot velocity corresponding to
wheelVelocities and the given drive parameters. |
static Pose2d |
wheelToRobotVelocities(java.util.List<java.lang.Double> wheelVelocities,
double trackWidth)
Computes the robot velocity corresponding to
wheelVelocities and the given drive parameters. |
public static MecanumKinematics INSTANCE
Mecanum drive kinematic equations. All wheel positions and velocities are given starting with front left and proceeding counter-clockwise (i.e., front left, rear left, rear right, front right). 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 paper provides a motivated derivation.
@JvmStatic @JvmOverloads @NotNull public static java.util.List<java.lang.Double> robotToWheelVelocities(@NotNull Pose2d robotVel, double trackWidth, double wheelBase)
Computes the wheel velocities corresponding to robotVel
given the provided trackWidth
and
wheelBase
.
robotVel
- velocity of the robot in its reference frametrackWidth
- lateral distance between pairs of wheels on different sides of the robotwheelBase
- distance between pairs of wheels on the same side of the robotrobotVel
,
trackWidth
,
wheelBase
@JvmStatic @JvmOverloads @NotNull public static java.util.List<java.lang.Double> robotToWheelVelocities(@NotNull Pose2d robotVel, double trackWidth)
Computes the wheel velocities corresponding to robotVel
given the provided trackWidth
and
wheelBase
.
robotVel
- velocity of the robot in its reference frametrackWidth
- lateral distance between pairs of wheels on different sides of the robotrobotVel
,
trackWidth
,
wheelBase
@JvmStatic @JvmOverloads @NotNull public static java.util.List<java.lang.Double> robotToWheelAccelerations(@NotNull Pose2d robotAccel, double trackWidth, double wheelBase)
Computes the wheel accelerations corresponding to robotAccel
given the provided trackWidth
and
wheelBase
.
robotAccel
- acceleration of the robot in its reference frametrackWidth
- lateral distance between pairs of wheels on different sides of the robotwheelBase
- distance between pairs of wheels on the same side of the robotrobotAccel
,
trackWidth
,
wheelBase
@JvmStatic @JvmOverloads @NotNull public static java.util.List<java.lang.Double> robotToWheelAccelerations(@NotNull Pose2d robotAccel, double trackWidth)
Computes the wheel accelerations corresponding to robotAccel
given the provided trackWidth
and
wheelBase
.
robotAccel
- acceleration of the robot in its reference frametrackWidth
- lateral distance between pairs of wheels on different sides of the robotrobotAccel
,
trackWidth
,
wheelBase
@JvmStatic @JvmOverloads @NotNull public static Pose2d wheelToRobotVelocities(@NotNull java.util.List<java.lang.Double> wheelVelocities, double trackWidth, double wheelBase)
Computes the robot velocity corresponding to wheelVelocities
and the given drive parameters.
wheelVelocities
- wheel velocities (or wheel position deltas)trackWidth
- lateral distance between pairs of wheels on different sides of the robotwheelBase
- distance between pairs of wheels on the same side of the robotwheelVelocities
@JvmStatic @JvmOverloads @NotNull public static Pose2d wheelToRobotVelocities(@NotNull java.util.List<java.lang.Double> wheelVelocities, double trackWidth)
Computes the robot velocity corresponding to wheelVelocities
and the given drive parameters.
wheelVelocities
- wheel velocities (or wheel position deltas)trackWidth
- lateral distance between pairs of wheels on different sides of the robotwheelVelocities