Feedforward

class Feedforward(val kV: Double, val kA: Double, val kStatic: Double = 0.0)

Simple motor feedforward: v + a (+ optionally static) output = kV * velocity + kA * acceleration Units: velocity in cm/s, acceleration in cm/s^2

Constructors

Link copied to clipboard
constructor(kV: Double, kA: Double, kStatic: Double = 0.0)

Properties

Link copied to clipboard
val kA: Double
Link copied to clipboard
Link copied to clipboard
val kV: Double

Functions

Link copied to clipboard
fun calculate(velocity: Double, acceleration: Double): Double

Compute feedforward for given velocity and acceleration

fun calculate(wheelV: DoubleArray, wheelA: DoubleArray? = null): DoubleArray

Compute feedforward for an array of wheel velocities & accelerations