45 : kS(kS), kG(kG), kV(kV), kA(kA) {}
64 kV * velocity + kA * acceleration;
139 return (maxVoltage - kS *
wpi::sgn(velocity) -
163 return MaxAchievableAcceleration(-maxVoltage, angle, velocity);
#define WPILIB_DLLEXPORT
Definition: SymbolExports.h:36
A helper class that computes feedforward outputs for a simple arm (modeled as a motor acting against ...
Definition: ArmFeedforward.h:20
units::unit_t< Velocity > MaxAchievableVelocity(units::volt_t maxVoltage, units::unit_t< Angle > angle, units::unit_t< Acceleration > acceleration)
Calculates the maximum achievable velocity given a maximum voltage supply, a position,...
Definition: ArmFeedforward.h:86
units::radians_per_second Velocity
Definition: ArmFeedforward.h:23
units::volt_t Calculate(units::unit_t< Angle > angle, units::unit_t< Velocity > velocity, units::unit_t< Acceleration > acceleration=units::unit_t< Acceleration >(0)) const
Calculates the feedforward from the gains and setpoints.
Definition: ArmFeedforward.h:59
units::unit_t< Acceleration > MaxAchievableAcceleration(units::volt_t maxVoltage, units::unit_t< Angle > angle, units::unit_t< Velocity > velocity)
Calculates the maximum achievable acceleration given a maximum voltage supply, a position,...
Definition: ArmFeedforward.h:136
units::compound_unit< units::volts, units::inverse< Acceleration > > ka_unit
Definition: ArmFeedforward.h:30
units::compound_unit< units::radians_per_second, units::inverse< units::second > > Acceleration
Definition: ArmFeedforward.h:25
units::radians Angle
Definition: ArmFeedforward.h:22
units::unit_t< Acceleration > MinAchievableAcceleration(units::volt_t maxVoltage, units::unit_t< Angle > angle, units::unit_t< Velocity > velocity)
Calculates the minimum achievable acceleration given a maximum voltage supply, a position,...
Definition: ArmFeedforward.h:160
units::unit_t< Velocity > MinAchievableVelocity(units::volt_t maxVoltage, units::unit_t< Angle > angle, units::unit_t< Acceleration > acceleration)
Calculates the minimum achievable velocity given a maximum voltage supply, a position,...
Definition: ArmFeedforward.h:111
constexpr ArmFeedforward()=default
units::compound_unit< units::volts, units::inverse< units::radians_per_second > > kv_unit
Definition: ArmFeedforward.h:28
constexpr ArmFeedforward(units::volt_t kS, units::volt_t kG, units::unit_t< kv_unit > kV, units::unit_t< ka_unit > kA=units::unit_t< ka_unit >(0))
Creates a new ArmFeedforward with the specified gains.
Definition: ArmFeedforward.h:42
typename units::detail::inverse_impl< U >::type inverse
represents the inverse unit type of class U.
Definition: base.h:1134
dimensionless::scalar_t cos(const AngleUnit angle) noexcept
Compute cosine.
Definition: math.h:61
typename units::detail::compound_impl< U, Us... >::type compound_unit
Represents a unit type made up from other units.
Definition: base.h:1434
Definition: AprilTagFieldLayout.h:22
constexpr int sgn(T val)
Definition: MathExtras.h:936