Main Content

dubinsPathSegment

Dubins path segment connecting two poses

Since R2019b

Description

The dubinsPathSegment object holds information for a Dubins path segment that connects two poses as a sequence of three motions. The motion options are:

  • Straight

  • Left turn at maximum steer

  • Right turn at maximum steer

Creation

To generate a dubinsPathSegment object, use the connect function with a dubinsConnection object:

dubPathSeg = connect(connectionObj,start,goal) connects the start and goal pose using the specified connection type object.

To specifically define a path segment:

dubPathSeg = dubinsPathSegment(connectionObj,start,goal,motionLengths,motionTypes) specifies the Dubins connection type, the start and goal poses, and the corresponding motion lengths and types. These values are set to the corresponding properties in the object.

Properties

expand all

This property is read-only.

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

Data Types: double

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 meters. Θ is in radians.

Data Types: double

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 meters. Θ is in radians.

Data Types: double

This property is read-only.

Length of each motion in the path segment, in world units, specified as a three-element numeric vector. Each motion length corresponds to a motion type specified in MotionTypes.

Data Types: double

This property is read-only.

Type of each motion in the path segment, specified as a three-element string cell array.

Motion TypeDescription
"S"Straight
"L"

Left turn at the maximum steering angle of the vehicle

"R"

Right turn at the maximum steering angle of the vehicle

Each motion type corresponds to a motion length specified in MotionLengths.

For Dubins connections, the available path types are: {"LSL"} {"LSR"} {"RSL"} {"RSR"} {"RLR"} {"LRL"}.

Example: {"R" "S" "R"}

Data Types: cell

This property is read-only.

Length of the path segment, specified as a positive scalar in meters. This length is just a sum of the elements in MotionLengths.

Data Types: double

Object Functions

interpolateInterpolate poses along path segment
showVisualize path segment

Examples

collapse all

Create a dubinsConnection object.

dubConnObj = dubinsConnection;

Define start and goal poses as [x y theta] vectors.

startPose = [0 0 0];
goalPose = [1 1 pi];

Calculate a valid path segment to connect the poses.

[pathSegObj, pathCosts] = connect(dubConnObj,startPose,goalPose);

Show the generated path.

show(pathSegObj{1})

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2019b