Class VelocityFeedforwardController

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

public class VelocityFeedforwardController extends Controller
A velocity controller that uses a feedforward model to calculate motor outputs given velocity setpoints.
  • Constructor Details

    • VelocityFeedforwardController

      public VelocityFeedforwardController(MotorFeedforward feedforward)
      Create a velocity controller with a feedforward model
      Parameters:
      feedforward - the model
  • Method Details

    • calculate

      protected double calculate(double setpoint, double measurement)
      Calculates a motor output by feeding a velocity setpoint to a feedforward model.
      Specified by:
      calculate in class Controller
      Parameters:
      setpoint - velocity setpoint of the controller
      measurement - measurement, which is not used in calculating an output
      Returns:
      motor output from feedforward model