Main Content

driving.ReedsSheppPathSegment

Reeds-Shepp path segment

Description

A driving.ReedsSheppPathSegment object represents a segment of a planned vehicle path that was connected using the Reeds-Shepp connection method [1]. A Reeds-Shepp path segment is composed of a sequence of three to five motions. Each motion is one of these types:

  • Straight (forward or reverse)

  • Left turn at the maximum steering angle of the vehicle (forward or reverse)

  • Right turn at the maximum steering angle of the vehicle (forward or reverse)

The driving.ReedsSheppPathSegment objects that represent a path are stored in the PathSegments property of a driving.Path object. These paths are planned by a pathPlannerRRT object whose ConnectionMethod property is set to 'Dubins'.

Properties

expand all

This property is read-only.

Initial pose of the vehicle at the start of the path segment, specified as an [x, y, Θ] vector. x and y are in world units, such as meters. Θ is in degrees.

This property is read-only.

Goal pose of the vehicle at the end of the path segment, specified as an [x, y, Θ] vector. x and y are in world units, such as meters. Θ is in degrees.

This property is read-only.

Minimum turning radius of the vehicle, in world units, specified as a positive real scalar. This value corresponds to the radius of the turning circle at the maximum steering angle of the vehicle.

This property is read-only.

Length of each motion in the path segment, in world units, specified as a five-element real-valued vector. Each motion length corresponds to a motion type specified in MotionTypes and a motion direction specified in MotionDirections.

When a path segment requires fewer than five motions, the remaining MotionLengths elements are set to 0. The remaining MotionTypes elements are set to "N" (no motion).

This property is read-only.

Type of each motion in the path segment, specified as a five-element string array. Valid values are shown in this table.

Motion TypeDescription
"S"Straight (forward or reverse)
"L"

Left turn at the maximum steering angle of the vehicle (forward or reverse)

"R"

Right turn at the maximum steering angle of the vehicle (forward or reverse)

"N"No motion

MotionTypes contains a minimum of three motions, specified as a combination of "S", "L", and "R" elements. If a path segment has fewer than five motions, the remaining elements of MotionTypes are "N" (no motion).

Each motion type corresponds to a motion length specified in MotionLengths and a motion direction specified in MotionDirections.

Example: ["R" "S" "R" "L" "N"]

This property is read-only.

Direction of each motion in the path segment, specified as a five-element vector of 1s (forward motion) and –1s (reverse motion). Each motion direction corresponds to a motion length specified in MotionLengths and a motion type specified in MotionTypes.

When no motion occurs, that is, when a MotionTypes value is "N", then the corresponding MotionDirections element is 1.

Example: [-1 1 -1 1 1]

This property is read-only.

Length of the path segment, in world units, specified as a positive real scalar.

References

[1] Reeds, J. A., and L. A. Shepp. "Optimal Paths for a Car That Goes Both Forwards and Backwards." Pacific Journal of Mathematics. Vol. 145, Number 2, 1990, pp. 367–393.

Extended Capabilities

Introduced in R2018b