Filters the provided voltages to limit a differential drive's linear and angular acceleration.
More...
#include <frc/controller/DifferentialDriveAccelerationLimiter.h>
|
| DifferentialDriveAccelerationLimiter (LinearSystem< 2, 2, 2 > system, units::meter_t trackwidth, units::meters_per_second_squared_t maxLinearAccel, units::radians_per_second_squared_t maxAngularAccel) |
| Constructs a DifferentialDriveAccelerationLimiter. More...
|
|
| DifferentialDriveAccelerationLimiter (LinearSystem< 2, 2, 2 > system, units::meter_t trackwidth, units::meters_per_second_squared_t minLinearAccel, units::meters_per_second_squared_t maxLinearAccel, units::radians_per_second_squared_t maxAngularAccel) |
| Constructs a DifferentialDriveAccelerationLimiter. More...
|
|
DifferentialDriveWheelVoltages | Calculate (units::meters_per_second_t leftVelocity, units::meters_per_second_t rightVelocity, units::volt_t leftVoltage, units::volt_t rightVoltage) |
| Returns the next voltage pair subject to acceleraiton constraints. More...
|
|
Filters the provided voltages to limit a differential drive's linear and angular acceleration.
The differential drive model can be created via the functions in LinearSystemId.
◆ DifferentialDriveAccelerationLimiter() [1/2]
frc::DifferentialDriveAccelerationLimiter::DifferentialDriveAccelerationLimiter |
( |
LinearSystem< 2, 2, 2 > |
system, |
|
|
units::meter_t |
trackwidth, |
|
|
units::meters_per_second_squared_t |
maxLinearAccel, |
|
|
units::radians_per_second_squared_t |
maxAngularAccel |
|
) |
| |
Constructs a DifferentialDriveAccelerationLimiter.
- Parameters
-
system | The differential drive dynamics. |
trackwidth | The distance between the differential drive's left and right wheels. |
maxLinearAccel | The maximum linear acceleration. |
maxAngularAccel | The maximum angular acceleration. |
◆ DifferentialDriveAccelerationLimiter() [2/2]
frc::DifferentialDriveAccelerationLimiter::DifferentialDriveAccelerationLimiter |
( |
LinearSystem< 2, 2, 2 > |
system, |
|
|
units::meter_t |
trackwidth, |
|
|
units::meters_per_second_squared_t |
minLinearAccel, |
|
|
units::meters_per_second_squared_t |
maxLinearAccel, |
|
|
units::radians_per_second_squared_t |
maxAngularAccel |
|
) |
| |
Constructs a DifferentialDriveAccelerationLimiter.
- Parameters
-
system | The differential drive dynamics. |
trackwidth | The distance between the differential drive's left and right wheels. |
minLinearAccel | The minimum (most negative) linear acceleration. |
maxLinearAccel | The maximum (most positive) linear acceleration. |
maxAngularAccel | The maximum angular acceleration. |
- Exceptions
-
std::invalid_argument | if minimum linear acceleration is greater than maximum linear acceleration |
◆ Calculate()
DifferentialDriveWheelVoltages frc::DifferentialDriveAccelerationLimiter::Calculate |
( |
units::meters_per_second_t |
leftVelocity, |
|
|
units::meters_per_second_t |
rightVelocity, |
|
|
units::volt_t |
leftVoltage, |
|
|
units::volt_t |
rightVoltage |
|
) |
| |
Returns the next voltage pair subject to acceleraiton constraints.
- Parameters
-
leftVelocity | The left wheel velocity. |
rightVelocity | The right wheel velocity. |
leftVoltage | The unconstrained left motor voltage. |
rightVoltage | The unconstrained right motor voltage. |
- Returns
- The constrained wheel voltages.
The documentation for this class was generated from the following file: