core / com.acmerobotics.roadrunner.path / QuinticSpline

QuinticSpline

class QuinticSpline : ParametricCurve

Combination of two quintic polynomials into a 2D quintic spline. See this short paper for some motivation and implementation details.

Parameters

start - start waypoint

end - end waypoint

maxDeltaK - maximum change in curvature between arc length param segments

maxSegmentLength - maximum length of a single param segment

Types

Waypoint

class Waypoint

Class for representing the end points of interpolated quintic splines.

Constructors

<init>

QuinticSpline(start: QuinticSpline.Waypoint, end: QuinticSpline.Waypoint, maxDeltaK: Double = 0.01, maxSegmentLength: Double = 0.25)

Combination of two quintic polynomials into a 2D quintic spline. See this short paper for some motivation and implementation details.

Properties

x

val x: QuinticPolynomial

X polynomial (i.e., x(t))

y

val y: QuinticPolynomial

Y polynomial (i.e., y(t))

Functions

length

fun length(): Double

Returns the length of the curve.

toString

fun toString(): String

Inherited Functions

deriv

fun deriv(s: Double, t: Double = reparam(s)): Vector2d

Returns the derivative s units along the curve.

end

fun end(): Vector2d

Returns the end vector.

endDeriv

fun endDeriv(): Vector2d

Returns the end derivative.

endSecondDeriv

fun endSecondDeriv(): Vector2d

Returns the end second derivative.

endThirdDeriv

fun endThirdDeriv(): Vector2d

Returns the end third derivative.

get

operator fun get(s: Double, t: Double = reparam(s)): Vector2d

Returns the vector s units along the curve.

secondDeriv

fun secondDeriv(s: Double, t: Double = reparam(s)): Vector2d

Returns the second derivative s units along the curve.

start

fun start(): Vector2d

Returns the start vector.

startDeriv

fun startDeriv(): Vector2d

Returns the start derivative.

startSecondDeriv

fun startSecondDeriv(): Vector2d

Returns the start second derivative.

startThirdDeriv

fun startThirdDeriv(): Vector2d

Returns the start third derivative.

tangentAngle

fun tangentAngle(s: Double, t: Double = reparam(s)): Double

Returns the angle of the tangent line s units along the curve.

tangentAngleDeriv

fun tangentAngleDeriv(s: Double, t: Double = reparam(s)): Double

Returns the derivative of the tangent angle s units along the curve.

tangentAngleSecondDeriv

fun tangentAngleSecondDeriv(s: Double, t: Double = reparam(s)): Double

Returns the second derivative of the tangent angle s units along the curve.

thirdDeriv

fun thirdDeriv(s: Double, t: Double = reparam(s)): Vector2d

Returns the third derivative s units along the curve.