A helper class which computes the feedforward outputs for a differential drive drivetrain.
More...
#include <frc/controller/DifferentialDriveFeedforward.h>
|
constexpr | DifferentialDriveFeedforward (decltype(1_V/1_mps) kVLinear, decltype(1_V/1_mps_sq) kALinear, decltype(1_V/1_rad_per_s) kVAngular, decltype(1_V/1_rad_per_s_sq) kAAngular, units::meter_t trackwidth) |
| Creates a new DifferentialDriveFeedforward with the specified parameters.
|
|
constexpr | DifferentialDriveFeedforward (decltype(1_V/1_mps) kVLinear, decltype(1_V/1_mps_sq) kALinear, decltype(1_V/1_mps) kVAngular, decltype(1_V/1_mps_sq) kAAngular) |
| Creates a new DifferentialDriveFeedforward with the specified parameters.
|
|
DifferentialDriveWheelVoltages | Calculate (units::meters_per_second_t currentLeftVelocity, units::meters_per_second_t nextLeftVelocity, units::meters_per_second_t currentRightVelocity, units::meters_per_second_t nextRightVelocity, units::second_t dt) |
| Calculates the differential drive feedforward inputs given velocity setpoints.
|
|
A helper class which computes the feedforward outputs for a differential drive drivetrain.
◆ DifferentialDriveFeedforward() [1/2]
frc::DifferentialDriveFeedforward::DifferentialDriveFeedforward |
( |
decltype(1_V/1_mps) | kVLinear, |
|
|
decltype(1_V/1_mps_sq) | kALinear, |
|
|
decltype(1_V/1_rad_per_s) | kVAngular, |
|
|
decltype(1_V/1_rad_per_s_sq) | kAAngular, |
|
|
units::meter_t | trackwidth ) |
|
inlineconstexpr |
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. |
◆ DifferentialDriveFeedforward() [2/2]
frc::DifferentialDriveFeedforward::DifferentialDriveFeedforward |
( |
decltype(1_V/1_mps) | kVLinear, |
|
|
decltype(1_V/1_mps_sq) | kALinear, |
|
|
decltype(1_V/1_mps) | kVAngular, |
|
|
decltype(1_V/1_mps_sq) | kAAngular ) |
|
inlineconstexpr |
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()
DifferentialDriveWheelVoltages frc::DifferentialDriveFeedforward::Calculate |
( |
units::meters_per_second_t | currentLeftVelocity, |
|
|
units::meters_per_second_t | nextLeftVelocity, |
|
|
units::meters_per_second_t | currentRightVelocity, |
|
|
units::meters_per_second_t | nextRightVelocity, |
|
|
units::second_t | dt ) |
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. |
◆ m_kAAngular
decltype(1_V / 1_mps_sq) frc::DifferentialDriveFeedforward::m_kAAngular |
◆ m_kALinear
decltype(1_V / 1_mps_sq) frc::DifferentialDriveFeedforward::m_kALinear |
◆ m_kVAngular
decltype(1_V / 1_mps) frc::DifferentialDriveFeedforward::m_kVAngular |
◆ m_kVLinear
decltype(1_V / 1_mps) frc::DifferentialDriveFeedforward::m_kVLinear |
The documentation for this class was generated from the following file: