PIDFFController

open class PIDFFController : PIDF

A composite controller to use for PID+FF controls (with kV/kA calculated components). This controller is compatible with any error-correction need, including RUN_TO_POSIITON and RUN_USING_ENCODER modes in Motor.

To use an ArmFeedforward, consider using the ArmController, which will properly integrate the cosine of the arm position as part of your feedforward during a RUN_TO_POSITION.

Author

Lucas Bubner, 2024

Since

4.0.0

See also

Constructors

Link copied to clipboard
constructor(pid: PIDController, ff: SystemController, encoder: Encoder)
Construct a new PIDFFController.

Functions

Link copied to clipboard
open fun calculate(current: Double, target: Double): Double
Calculate the next output of this control algorithm.
Link copied to clipboard
open fun calculateVelo(currentVelo: Double, targetVelo: Double): Double
Alternative calculate method where the feedforward component will be assumed to be a velocity, allowing your feedforward to react faster.
Link copied to clipboard
Gets the current coefficients for this controller.
Link copied to clipboard
Link copied to clipboard
open fun reset()
Reset this controller back to an un-accumulated state, if applicable.
Link copied to clipboard
open fun setCoefficients(coeffs: Array<Double>)
Sets the coefficients for this controller.