core / com.acmerobotics.roadrunner.tuning / RampRegression / <init>

<init>

RampRegression(timeSamples: MutableList<Double> = mutableListOf(), positionSamples: MutableList<Double> = mutableListOf(), powerSamples: MutableList<Double> = mutableListOf())

Container for ramp feedforward regression data.

Here's the general procedure for gathering the requisite data:

  1. Slowly ramp the motor power/voltage and record encoder values along the way.
  2. Run a linear regression on the encoder velocity vs. motor power plot to obtain a slope (kV) and an optional intercept (kStatic).

Parameters

timeSamples - time samples

positionSamples - position samples

powerSamples - power (scaled voltage) samples