PositionPath

Represents a parametric 2D position path \((x(t), y(t))\) with automatic differentiation support.

This interface defines a path in 2D space parameterized by a value of type Param. The path can be evaluated at any parameter value to obtain position and derivatives up to order n.

Parameters

Param

The parameter type \(t\) used to parameterize the path (e.g., arc length, time)

Inheritors

Functions

Link copied to clipboard
open fun begin(n: Int): Vector2dDual<Param>

Evaluates the path at the beginning (parameter = 0).

Link copied to clipboard
open fun end(n: Int): Vector2dDual<Param>

Evaluates the path at the end (parameter = length).

Link copied to clipboard
abstract operator fun get(param: Double, n: Int): Vector2dDual<Param>
Link copied to clipboard
abstract fun length(): Double

Returns the total length of the path in the parameter space.

Link copied to clipboard
open fun project(query: Vector2d, init: Double = 0.0): Double

Projects a query point onto the path using Newton's method.

Link copied to clipboard

Creates a PosePath using this path for position and constant heading.

Link copied to clipboard
open fun withLinearHeading(startHeading: Rotation2d, endHeading: Rotation2d): HeadingPosePath
open fun withLinearHeading(startHeading: Double, endHeading: Double): HeadingPosePath

Creates a PosePath using this path for position and a linear interpolation between startHeading and endHeading for heading.

Link copied to clipboard
open fun withSplineHeading(startHeading: Rotation2d, endHeading: Rotation2d): HeadingPosePath
open fun withSplineHeading(startHeading: Double, endHeading: Double): HeadingPosePath

Creates a PosePath using this path for position and a linear interpolation between startHeading and endHeading for heading.

Link copied to clipboard

Creates a PosePath using this path for position and its tangent for heading.