core / com.acmerobotics.roadrunner.util / GuidingVectorField

GuidingVectorField

class GuidingVectorField (source)

Guiding vector field for effective path following described in section III, eq. (9) of 1610.04391.pdf. Implementation note: 2D parametric curves are used to describe paths instead of implicit curves of the form f(x,y) = 0 as described in the paper (which dramatically affects the cross track error calculation).

Parameters

path - path to follow (interpolator is ignored)

kN - path normal weight (see eq. (9))

errorMapFunc - custom error mapping (see eq. (4))

Types

GVFResult

Container for the direction of the GVF and intermediate values used in its computation.

data class GVFResult

Constructors

<init>

Guiding vector field for effective path following described in section III, eq. (9) of 1610.04391.pdf. Implementation note: 2D parametric curves are used to describe paths instead of implicit curves of the form f(x,y) = 0 as described in the paper (which dramatically affects the cross track error calculation).

GuidingVectorField(path: Path, kN: Double, errorMapFunc: (Double) -> Double = { it })

Functions

get

Returns the normalized value of the vector field at the given point.

operator fun get(x: Double, y: Double): Vector2d

getExtended

Returns the normalized value of the vector field at the given point along with useful intermediate computations.

fun getExtended(x: Double, y: Double, projectGuess: Double = path.length() / 2.0): GVFResult