DifferentialDriveFeedforward
- class wpimath.DifferentialDriveFeedforward(*args, **kwargs)
Bases:
pybind11_objectA helper class which computes the feedforward outputs for a differential drive drivetrain.
Overloaded function.
__init__(self: wpimath._wpimath.DifferentialDriveFeedforward, kVLinear: wpimath.units.volt_seconds_per_meter, kALinear: wpimath.units.volt_seconds_squared_per_meter, kVAngular: wpimath.units.volt_seconds_per_radian, kAAngular: wpimath.units.volt_seconds_squared_per_radian, trackwidth: wpimath.units.meters) -> None
Creates a new DifferentialDriveFeedforward with the specified parameters.
- Parameters:
kVLinear – The linear velocity gain in volts per (meters per second).
kALinear – The linear acceleration gain in volts per (meters per second squared).
kVAngular – The angular velocity gain in volts per (radians per second).
kAAngular – The angular acceleration gain in volts per (radians per second squared).
trackwidth – The distance between the differential drive’s left and right wheels, in meters.
__init__(self: wpimath._wpimath.DifferentialDriveFeedforward, kVLinear: wpimath.units.volt_seconds_per_meter, kALinear: wpimath.units.volt_seconds_squared_per_meter, kVAngular: wpimath.units.volt_seconds_per_meter, kAAngular: wpimath.units.volt_seconds_squared_per_meter) -> None
Creates a new DifferentialDriveFeedforward with the specified parameters.
- Parameters:
kVLinear – The linear velocity gain in volts per (meters per second).
kALinear – The linear acceleration gain in volts per (meters per second squared).
kVAngular – The angular velocity gain in volts per (meters per second).
kAAngular – The angular acceleration gain in volts per (meters per second squared).
- calculate(currentLeftVelocity: wpimath.units.meters_per_second, nextLeftVelocity: wpimath.units.meters_per_second, currentRightVelocity: wpimath.units.meters_per_second, nextRightVelocity: wpimath.units.meters_per_second, dt: wpimath.units.seconds) wpimath._wpimath.DifferentialDriveWheelVoltages
Calculates the differential drive feedforward inputs given velocity setpoints.
- Parameters:
currentLeftVelocity – The current left velocity of the differential drive in meters/second.
nextLeftVelocity – The next left velocity of the differential drive in meters/second.
currentRightVelocity – The current right velocity of the differential drive in meters/second.
nextRightVelocity – The next right velocity of the differential drive in meters/second.
dt – Discretization timestep.