Package-level declarations

Types

Link copied to clipboard
class ReedsSheppPath(val start: Vector2, val startDirection: Vector2, val radius: Double, val segments: List<ReedsSheppSegment>)

A Reeds-Shepp path: a path from start with the car heading in startDirection, for a car that drives forwards and in reverse and turns at most as sharply as a circle of radius. It consists of up to five segments; where the sign of their lengths changes, the car changes gear and the path has a cusp.

Link copied to clipboard
data class ReedsSheppSegment(val steering: ReedsSheppSteering, val length: Double)

A piece of a Reeds-Shepp path: a steering over a signed length; negative lengths drive in reverse.

Link copied to clipboard

How a piece of a Reeds-Shepp path steers: LEFT turns towards the normal (-y, x) of the heading at the minimum radius, RIGHT the other way, STRAIGHT not at all. In a y-down frame, as on screen, LEFT turns clockwise when driving forwards.

Functions

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

The shortest Reeds-Shepp path from the pose (start, startDirection) to (end, endDirection): the shortest path for a car that drives forwards and in reverse and turns at most as sharply as a circle of radius. Equal poses give a path of length zero.

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

All Reeds-Shepp candidate paths from the pose (start, startDirection) to (end, endDirection) with minimum turning radius, shortest first. The shortest is the optimal path; the others are the optimal paths of their types, after Reeds and Shepp, "Optimal paths for a car that goes both forwards and backwards" (1990).