DifferentialDriveAccelerationLimiter
- class wpimath.DifferentialDriveAccelerationLimiter(*args, **kwargs)
Bases:
pybind11_objectFilters the provided voltages to limit a differential drive’s linear and angular acceleration.
The differential drive model can be created via the functions in Models.
Overloaded function.
__init__(self: wpimath._wpimath.DifferentialDriveAccelerationLimiter, system: wpimath._wpimath.LinearSystem_2_2_2, trackwidth: wpimath.units.meters, maxLinearAccel: wpimath.units.meters_per_second_squared, maxAngularAccel: wpimath.units.radians_per_second_squared) -> None
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.
__init__(self: wpimath._wpimath.DifferentialDriveAccelerationLimiter, system: wpimath._wpimath.LinearSystem_2_2_2, trackwidth: wpimath.units.meters, minLinearAccel: wpimath.units.meters_per_second_squared, maxLinearAccel: wpimath.units.meters_per_second_squared, maxAngularAccel: wpimath.units.radians_per_second_squared) -> None
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. @throws std::invalid_argument if minimum linear acceleration is greater than maximum linear acceleration
- calculate(leftVelocity: wpimath.units.meters_per_second, rightVelocity: wpimath.units.meters_per_second, leftVoltage: wpimath.units.volts, rightVoltage: wpimath.units.volts) wpimath._wpimath.DifferentialDriveWheelVoltages
Returns the next voltage pair subject to acceleration 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.