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