Class ElevatorFeedforward

java.lang.Object
com.stuypulse.stuylib.control.Controller
com.stuypulse.stuylib.control.feedforward.ElevatorFeedforward

public class ElevatorFeedforward extends Controller
A feedforward term to account for gravity for motorized lifts.

The motor feedforward used in the context of a lift will not account for gravity that is acting on the lift.

Can be paired with MotorFeedforward or other controllers with .add

  • Constructor Details

    • ElevatorFeedforward

      public ElevatorFeedforward(Number kG)
      Create ElevatorFeedforward
      Parameters:
      kG - voltage to hold lift
  • Method Details

    • calculate

      protected double calculate(double setpoint, double measurement)
      Calculate voltage to hold elevator at setpoint height
      Specified by:
      calculate in class Controller
      Parameters:
      setpoint - setpoint
      measurement - measurement
      Returns:
      kG