Class AngleArmFeedforward
java.lang.Object
com.stuypulse.stuylib.control.angle.AngleController
com.stuypulse.stuylib.control.angle.feedforward.AngleArmFeedforward
A feedforward term to account for gravity for motorized arms that can move continuously (if not
use `ArmFeedforward`)
The motor feedforward used in the context of an arm will not account for gravity that is acting on the arm.
Can be paired with MotorFeedforward or other controllers with .add
-
Constructor Summary
-
Method Summary
Methods inherited from class com.stuypulse.stuylib.control.angle.AngleController
add, getError, getMeasurement, getOutput, getSetpoint, isDoneDegrees, isDoneRadians, setMeasurementFilter, setOutputFilter, setSetpointFilter, update
-
Constructor Details
-
AngleArmFeedforward
Create arm feedforward- Parameters:
kG
- term to hold arm vertical against gravity (volts)
-
-
Method Details
-
calculate
Calculates voltage to hold arm at the setpoint angle- Specified by:
calculate
in classAngleController
- Parameters:
setpoint
- setpointmeasurement
- measurement- Returns:
- kG * cos(setpoint)
-