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

WiggleInterpolator

class WiggleInterpolator : HeadingInterpolator (source)

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.

Parameters

amplitude - amplitude of the wiggle oscillations

desiredPeriod - period fo the wiggle oscillations

baseInterpolator - base interpolator to add oscillations to (e.g., oscillations relative to the tangent)

Constructors

<init>

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.

WiggleInterpolator(amplitude: Double, desiredPeriod: Double, baseInterpolator: HeadingInterpolator = TangentInterpolator())

Functions

init

Initialize the interpolator with a curve.

fun init(curve: ParametricCurve): Unit