core / com.acmerobotics.roadrunner.tuning / AccelRegression

AccelRegression

class AccelRegression (source)

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

Feedforward parameter estimates from the ramp regression and additional summary statistics

data class AccelResult

Constructors

<init>

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.

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

Functions

add

Add a sample to the regression.

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

fit

Fit kA from the accel test data.

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

save

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

fun save(file: File): Unit