Package-level declarations

Types

Link copied to clipboard
class DubinsPath(val start: Vector2, val startDirection: Vector2, val radius: Double, val word: DubinsWord, val lengths: List<Double>)

A Dubins path: the shortest path from start, leaving in startDirection, to an end pose, for a vehicle that only moves forwards and turns at most as sharply as a circle of radius. It consists of three pieces after its word, of lengths lengths; an arc of length l turns by l / radius.

Link copied to clipboard

The six candidate shapes of a Dubins path: L a turn towards the normal (-y, x) of the direction of travel, R a turn the other way, both at the minimum radius, and S a straight segment. In a y-down frame, as on screen, L turns clockwise.

Functions

Link copied to clipboard
fun dubinsPath(start: Vector2, startDirection: Vector2, end: Vector2, endDirection: Vector2, radius: Double): DubinsPath

The shortest Dubins path from the pose (start, startDirection) to (end, endDirection) for a vehicle that only moves forwards and turns at most as sharply as a circle of radius, see dubinsPaths. Equal poses give a path of length zero.

Link copied to clipboard
fun List<Vector2>.dubinsPath(radius: Double, closed: Boolean = false, directions: List<Vector2>? = null, polarity: YPolarity = YPolarity.CW_NEGATIVE_Y): ShapeContour

The shortest Dubins paths between consecutive points of this polyline, joined into a contour: the path a vehicle with minimum turning radius takes through the points. When directions is null, the direction at every point is that of the centripetal Catmull-Rom spline through the points. The path passes through every point in its direction and is tangent-continuous; between points it consists of arcs of radius and straight segments.

Link copied to clipboard
fun dubinsPaths(start: Vector2, startDirection: Vector2, end: Vector2, endDirection: Vector2, radius: Double): List<DubinsPath>

All Dubins paths from the pose (start, startDirection) to (end, endDirection) with minimum turning radius, shortest first, one for every word that has a solution, after Shkel and Lumelsky, "Classification of the Dubins set" (Robotics and Autonomous Systems, 2001). The poses are normalized so that the start lies at the origin, the end on the positive x-axis at distance d in units of the radius, with the directions α and β relative to that axis; every word then gives the three normalized piece lengths in closed form.