ArmFeedforward

Feedforward controller for arm mechanisms.

This feedforward applies a gravity compensation term that varies with arm angle (using cosine), plus velocity and acceleration feedforward terms. It is suitable for rotational mechanisms like arms where the gravity torque depends on the arm's angular position.

Parameters

coefficients

the GravityFeedforwardParameters containing the feedforward gains

Constructors

Link copied to clipboard
constructor(coefficients: GravityFeedforwardParameters)
constructor(kG: Double, kS: Double = 0.0, kV: Double = 0.0, kA: Double = 0.0)

Secondary constructor for initializing the feedforward gains using individual parameters.

Properties

Functions

Link copied to clipboard

Calculates the feedforward output from a MotionState.

fun calculate(position: Double, velocity: Double, acceleration: Double): Double

Calculates the feedforward output for the given position, velocity, and acceleration.