core / com.acmerobotics.roadrunner.path / Path

Path

class Path

Path composed of a list of parametric curves and heading interpolators.

Parameters

parametricCurves - parametric curves

interpolators - heading interpolators

reversed - whether or not to travel along the path segment in reverse

Types

ProjectionResult

data class ProjectionResult

Simple container for the result of a projection (i.e., a project call).

Constructors

<init>

Path(parametricCurve: ParametricCurve, interpolator: HeadingInterpolator = TangentInterpolator(), reversed: Boolean = false)Path(parametricCurves: List<ParametricCurve> = emptyList(), interpolators: List<HeadingInterpolator> = parametricCurves.map { TangentInterpolator() }, reversed: List<Boolean> = parametricCurves.map { false })

Path composed of a list of parametric curves and heading interpolators.

Properties

interpolators

val interpolators: List<HeadingInterpolator>

heading interpolators

parametricCurves

val parametricCurves: List<ParametricCurve>

parametric curves

reversed

val reversed: List<Boolean>

whether or not to travel along the path segment in reverse

Functions

deriv

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

Returns the pose derivative s units along the path.

end

fun end(): Pose2d

Returns the end pose.

endDeriv

fun endDeriv(): Pose2d

Returns the end pose derivative.

endSecondDeriv

fun endSecondDeriv(): Pose2d

Returns the end pose second derivative.

get

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

Returns the pose s units along the path.

length

fun length(): Double

Returns the length of the path.

project

fun project(point: Vector2d, projectGuess: Double = length() / 2.0): Path.ProjectionResult

Project point onto the current path.

secondDeriv

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

Returns the pose second derivative s units along the path.

start

fun start(): Pose2d

Returns the start pose.

startDeriv

fun startDeriv(): Pose2d

Returns the start pose derivative.

startSecondDeriv

fun startSecondDeriv(): Pose2d

Returns the start pose second derivative.