MecanumDriveWheelVelocities

class wpimath.MecanumDriveWheelVelocities(front_left: wpimath.units.meters_per_second = 0, front_right: wpimath.units.meters_per_second = 0, rear_left: wpimath.units.meters_per_second = 0, rear_right: wpimath.units.meters_per_second = 0)

Bases: pybind11_object

Represents the wheel velocities for a mecanum drive drivetrain.

WPIStruct = <capsule object "WPyStruct">
desaturate(attainable_max_velocity: wpimath.units.meters_per_second) wpimath._wpimath.MecanumDriveWheelVelocities

Renormalizes the wheel velocities if any individual velocity is above the specified maximum.

Sometimes, after inverse kinematics, the requested velocity from one or more wheels may be above the max attainable velocity for the driving motor on that wheel. To fix this issue, one can reduce all the wheel velocities to make sure that all requested module velocities are at-or-below the absolute threshold, while maintaining the ratio of velocities between wheels.

Parameters:

attainable_max_velocity – The absolute max velocity that a wheel can reach.

Returns:

The desaturated MecanumDriveWheelVelocities.

static from_feet(front_left: wpimath.units.feet_per_second, front_right: wpimath.units.feet_per_second, rear_left: wpimath.units.feet_per_second, rear_right: wpimath.units.feet_per_second) wpimath._wpimath.MecanumDriveWheelVelocities
property front_left_fps
property front_right_fps
property rear_left_fps
property rear_right_fps