core / com.acmerobotics.roadrunner.path.heading / HeadingInterpolator

HeadingInterpolator

abstract class HeadingInterpolator

Interpolator for specifying the heading for holonomic paths.

Constructors

<init>

HeadingInterpolator()

Interpolator for specifying the heading for holonomic paths.

Properties

parametricCurve

lateinit var parametricCurve: ParametricCurve

Functions

deriv

abstract fun deriv(displacement: Double): Double

Returns the heading derivative at the specified displacement.

end

fun end(): Double

Returns the end heading.

endDeriv

fun endDeriv(): Double

Returns the end heading derivative.

endSecondDeriv

fun endSecondDeriv(): Double

Returns the end heading second derivative.

get

abstract operator fun get(displacement: Double): Double

Returns the heading at the specified displacement.

init

open fun init(parametricCurve: ParametricCurve): Unit

Initialize the interpolator with a parametricCurve.

respectsDerivativeContinuity

abstract fun respectsDerivativeContinuity(): Boolean

Returns true if the heading interpolator respects derivative continuity at path segment endpoints. That is, the start and end heading derivatives match those of the TangentInterpolator.

secondDeriv

abstract fun secondDeriv(displacement: Double): Double

Returns the heading second derivative at the specified displacement.

start

fun start(): Double

Returns the start heading.

startDeriv

fun startDeriv(): Double

Returns the start heading derivative.

startSecondDeriv

fun startSecondDeriv(): Double

Returns the start heading second derivative.

Inheritors

ConstantInterpolator

class ConstantInterpolator : HeadingInterpolator

Constant heading interpolator used for arbitrary holonomic translations.

LinearInterpolator

class LinearInterpolator : HeadingInterpolator

Linear heading interpolator for time-optimal transitions between poses.

SplineInterpolator

class SplineInterpolator : HeadingInterpolator

Spline heading interpolator for transitioning smoothly between headings without violating continuity (and hence allowing for integration into longer profiles).

TangentInterpolator

class TangentInterpolator : HeadingInterpolator

Tangent (system) interpolator for tank/differential and other nonholonomic drives.

WiggleInterpolator

class WiggleInterpolator : HeadingInterpolator

Heading interpolator that wraps another interpolator and adds sinusoidal oscillations ("wiggles") while preserving continuity. More specifically, the wiggle function is composed of a sine wave with a quintic spline on either end.