Package frc.lib.math
Class AngledElevatorFeedForward
java.lang.Object
edu.wpi.first.math.controller.ElevatorFeedforward
frc.lib.math.AngledElevatorFeedForward
- All Implemented Interfaces:
ProtobufSerializable,StructSerializable,WPISerializable
A helper class that computes feedforward outputs for an elevator on a pivot (modeled as a motor
acting against the force of gravity).
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionAngledElevatorFeedForward(double ks, double kg, double kv) Creates a new ElevatorFeedforward with the specified gains. -
Method Summary
Methods inherited from class edu.wpi.first.math.controller.ElevatorFeedforward
calculate, maxAchievableAcceleration, maxAchievableVelocity, minAchievableAcceleration, minAchievableVelocity
-
Constructor Details
-
AngledElevatorFeedForward
public AngledElevatorFeedForward(double ks, double kg, double kv) Creates a new ElevatorFeedforward with the specified gains. Units of the gain values will dictate units of the computed feedforward.- Parameters:
ks- The static gain.kg- The gravity gain.kv- The velocity gain.
-
-
Method Details
-
calculate
public double calculate(double positionRadians, double velocity, double acceleration) Calculates the feedforward from the gains and setpoints.- Overrides:
calculatein classElevatorFeedforward- Parameters:
positionRadians- Angle of the elevatorvelocity- The velocity setpoint.acceleration- The acceleration setpoint.- Returns:
- The computed feedforward.
-
calculate
public double calculate(double positionRadians, double velocity) Calculates the feedforward from the gains and setpoints.- Overrides:
calculatein classElevatorFeedforward- Parameters:
positionRadians- Angle of the elevatorvelocity- The velocity setpoint.- Returns:
- The computed feedforward.
-