Package frc.lib.math

Class AngledElevatorFeedForward

All Implemented Interfaces:
ProtobufSerializable, StructSerializable, WPISerializable

public class AngledElevatorFeedForward extends ElevatorFeedforward
A helper class that computes feedforward outputs for an elevator on a pivot (modeled as a motor acting against the force of gravity).
  • 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:
      calculate in class ElevatorFeedforward
      Parameters:
      positionRadians - Angle of the elevator
      velocity - 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:
      calculate in class ElevatorFeedforward
      Parameters:
      positionRadians - Angle of the elevator
      velocity - The velocity setpoint.
      Returns:
      The computed feedforward.