core / com.acmerobotics.roadrunner.tuning / AccelRegression

AccelRegression

class AccelRegression

Container for acceleration feedforward regression data. This data can be gathered through pretty much any motion although it's standard to apply constant/step voltage/power.

Parameters

timeSamples - time samples

positionSamples - position samples

powerSamples - power (scaled voltage) samples

Types

AccelResult

data class AccelResult

Feedforward parameter estimates from the ramp regression and additional summary statistics

Constructors

<init>

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

Container for acceleration feedforward regression data. This data can be gathered through pretty much any motion although it's standard to apply constant/step voltage/power.

Functions

add

fun add(time: Double, position: Double, power: Double): Unit

Add a sample to the regression.

fit

fun fit(kV: Double, kStatic: Double): AccelRegression.AccelResult

Fit kA from the accel test data.

save

fun save(file: File): Unit

Save the data to a CSV file for debugging or additional analysis.