MecanumDriveWheelVelocities

class wpimath.MecanumDriveWheelVelocities(frontLeft: wpimath.units.meters_per_second = 0, frontRight: wpimath.units.meters_per_second = 0, rearLeft: wpimath.units.meters_per_second = 0, rearRight: wpimath.units.meters_per_second = 0)

Bases: pybind11_object

Represents the wheel velocities for a mecanum drive drivetrain.

WPIStruct = <capsule object "WPyStruct">
desaturate(attainableMaxVelocity: 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:

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

Returns:

The desaturated MecanumDriveWheelVelocities.

static fromFeet(frontLeft: wpimath.units.feet_per_second, frontRight: wpimath.units.feet_per_second, rearLeft: wpimath.units.feet_per_second, rearRight: wpimath.units.feet_per_second) wpimath._wpimath.MecanumDriveWheelVelocities
property frontLeft_fps
property frontRight_fps
property rearLeft_fps
property rearRight_fps