|
WPILibC++
2020.3.2
|
Represents the wheel speeds for a mecanum drive drivetrain. More...
#include <MecanumDriveWheelSpeeds.h>
Public Member Functions | |
| void | Normalize (units::meters_per_second_t attainableMaxSpeed) |
| Normalizes the wheel speeds using some max attainable speed. More... | |
Public Attributes | |
| units::meters_per_second_t | frontLeft = 0_mps |
| Speed of the front-left wheel. | |
| units::meters_per_second_t | frontRight = 0_mps |
| Speed of the front-right wheel. | |
| units::meters_per_second_t | rearLeft = 0_mps |
| Speed of the rear-left wheel. | |
| units::meters_per_second_t | rearRight = 0_mps |
| Speed of the rear-right wheel. | |
Represents the wheel speeds for a mecanum drive drivetrain.
| void frc::MecanumDriveWheelSpeeds::Normalize | ( | units::meters_per_second_t | attainableMaxSpeed | ) |
Normalizes the wheel speeds using some max attainable speed.
Sometimes, after inverse kinematics, the requested speed from a/several modules may be above the max attainable speed for the driving motor on that module. To fix this issue, one can "normalize" all the wheel speeds to make sure that all requested module speeds are below the absolute threshold, while maintaining the ratio of speeds between modules.
| attainableMaxSpeed | The absolute max speed that a wheel can reach. |