Class VelocityFeedforwardController
java.lang.Object
com.stuypulse.stuylib.control.Controller
com.stuypulse.stuylib.control.feedforward.VelocityFeedforwardController
A velocity controller that uses a feedforward model to calculate motor outputs given velocity
setpoints.
-
Constructor Summary
ConstructorDescriptionVelocityFeedforwardController
(MotorFeedforward feedforward) Create a velocity controller with a feedforward model -
Method Summary
Modifier and TypeMethodDescriptionprotected double
calculate
(double setpoint, double measurement) Calculates a motor output by feeding a velocity setpoint to a feedforward model.Methods inherited from class com.stuypulse.stuylib.control.Controller
add, getError, getMeasurement, getOutput, getSetpoint, isDone, setMeasurementFilter, setOutputFilter, setSetpointFilter, update
-
Constructor Details
-
VelocityFeedforwardController
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 classController
- Parameters:
setpoint
- velocity setpoint of the controllermeasurement
- measurement, which is not used in calculating an output- Returns:
- motor output from feedforward model
-