![]() |
WPILibC++ 2027.0.0-alpha-4
|
Represents the wheel accelerations for a mecanum drive drivetrain. More...
#include <wpi/math/kinematics/MecanumDriveWheelAccelerations.hpp>
Public Attributes | |
| units::meters_per_second_squared_t | frontLeft = 0_mps_sq |
| Acceleration of the front-left wheel. | |
| units::meters_per_second_squared_t | frontRight = 0_mps_sq |
| Acceleration of the front-right wheel. | |
| units::meters_per_second_squared_t | rearLeft = 0_mps_sq |
| Acceleration of the rear-left wheel. | |
| units::meters_per_second_squared_t | rearRight = 0_mps_sq |
| Acceleration of the rear-right wheel. | |
Represents the wheel accelerations for a mecanum drive drivetrain.
|
inlineconstexpr |
Multiplies the MecanumDriveWheelAccelerations by a scalar and returns the new MecanumDriveWheelAccelerations.
For example, MecanumDriveWheelAccelerations{2.0, 2.5, 3.0, 3.5} * 2 = MecanumDriveWheelAccelerations{4.0, 5.0, 6.0, 7.0}
| scalar | The scalar to multiply by. |
|
inlineconstexpr |
Adds two MecanumDriveWheelAccelerations and returns the sum.
For example, MecanumDriveWheelAccelerations{1.0, 0.5, 2.0, 1.5} + MecanumDriveWheelAccelerations{2.0, 1.5, 0.5, 1.0} = MecanumDriveWheelAccelerations{3.0, 2.0, 2.5, 2.5}
| other | The MecanumDriveWheelAccelerations to add. |
|
inlineconstexpr |
Returns the inverse of the current MecanumDriveWheelAccelerations.
This is equivalent to negating all components of the MecanumDriveWheelAccelerations.
|
inlineconstexpr |
Subtracts the other MecanumDriveWheelAccelerations from the current MecanumDriveWheelAccelerations and returns the difference.
For example, MecanumDriveWheelAccelerations{5.0, 4.0, 6.0, 2.5} - MecanumDriveWheelAccelerations{1.0, 2.0, 3.0, 0.5} = MecanumDriveWheelAccelerations{4.0, 2.0, 3.0, 2.0}
| other | The MecanumDriveWheelAccelerations to subtract. |
|
inlineconstexpr |
Divides the MecanumDriveWheelAccelerations by a scalar and returns the new MecanumDriveWheelAccelerations.
For example, MecanumDriveWheelAccelerations{2.0, 2.5, 1.5, 1.0} / 2 = MecanumDriveWheelAccelerations{1.0, 1.25, 0.75, 0.5}
| scalar | The scalar to divide by. |
|
constexprdefault |
Compares two MecanumDriveWheelAccelerations objects.
| other | The other MecanumDriveWheelAccelerations. |
| units::meters_per_second_squared_t wpi::math::MecanumDriveWheelAccelerations::frontLeft = 0_mps_sq |
Acceleration of the front-left wheel.
| units::meters_per_second_squared_t wpi::math::MecanumDriveWheelAccelerations::frontRight = 0_mps_sq |
Acceleration of the front-right wheel.
| units::meters_per_second_squared_t wpi::math::MecanumDriveWheelAccelerations::rearLeft = 0_mps_sq |
Acceleration of the rear-left wheel.
| units::meters_per_second_squared_t wpi::math::MecanumDriveWheelAccelerations::rearRight = 0_mps_sq |
Acceleration of the rear-right wheel.