This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

robotics.ReedsSheppConnection

Reeds-Shepp path connection type

Description

The ReedSheppConnection object holds information for computing a ReedsSheppPathSegment object to connect between poses. A Reeds-Shepp path segment connects two poses as a sequence of five motions. The motion options are:

  • Straight

  • Left turn at maximum steer

  • Right turn at maximum steer

  • No movement

A Reeds-Shepp path segment supports both forward and backward motion.

Use this connection object to define parameters for a robot motion model, including the minimum turning radius and options for path types. To generate a path segment between poses using this connection type, call the connect function.

Creation

Syntax

reedsConnObj = robotics.ReedsSheppConnection
reedsConnObj = robotics.ReedsSheppConnection(Name,Value)

Description

example

reedsConnObj = robotics.ReedsSheppConnection creates an object using default property values.

example

reedsConnObj = robotics.ReedsSheppConnection(Name,Value) specifies property values using name-value pairs. To set multiple properties, specify multiple name-value pairs.

Properties

expand all

Minimum turning radius for the robot, specified as a positive scalar in meters. The minimum turning radius is for the smallest circle the robot can make with maximum steer in a single direction.

Data Types: double

Path types to disable, specified as a vector of string scalars or cell array of character vectors. Valid values are:

Motion TypeDescription
"Sp","Sn"Straight (p = forward, n=reverse)
"Lp","Ln"

Left turn at the maximum steering angle of the vehicle (p = forward, n=reverse)

"Rp","Rn"

Right turn at the maximum steering angle of the vehicle (p = forward, n=reverse)

"N"No motion

If a path segment has fewer than five motion types, the remaining elements are "N" (no motion).

To see all available path types, see the AllPathTypes property.

Example: ["LpSnLp","LnSnRpSn","LnSnRpSnLp"]

Data Types: cell

This property is read-only.

All possible path types, specified as a cell array of character vectors. This property lists all types. To disable certain types, specify types from this list in DisabledPathTypes.

For Reeds-Shepp connections, there are 44 possible combinations of motion types.

Data Types: cell

Cost multiple to travel forward, specified as a positive numeric scalar. Increase this property to penalize forward motion.

Data Types: double

Cost multiple to travel in reverse, specified as a positive numeric scalar. Increase this property to penalize reverse motion.

Data Types: double

Object Functions

connectConnect poses for given connection type

Examples

collapse all

Create a ReedsSheppConnection object.

reedsConnObj = robotics.ReedsSheppConnection;

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(reedsConnObj,startPose,goalPose);

Show the generated path.

show(pathSegObj{1})

Create a ReedsSheppConnection object.

reedsConnObj = robotics.ReedsSheppConnection;

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(reedsConnObj,startPose,goalPose);

Show the generated path. Notice the direction of the turns.

show(pathSegObj{1})

pathSegObj{1}.MotionTypes
ans = 1×5 cell array
    {'L'}    {'R'}    {'L'}    {'N'}    {'N'}

pathSegObj{1}.MotionDirections
ans = 1×5

     1    -1     1     1     1

Disable this specific motion sequence in a new connection object. Reduce the MinTurningRadius if the robot is more manueverable. Increase the reverse cost to reduce the likelihood of reverse directions being used. Connect the poses again to get a different path.

reedsConnObj = robotics.ReedsSheppConnection('DisabledPathTypes',{'LpRnLp'});
reedsConnObj.MinTurningRadius = 0.5;
reedsConnObj.ReverseCost = 5;

[pathSegObj,pathCosts] = connect(reedsConnObj,startPose,goalPose);
pathSegObj{1}.MotionTypes
ans = 1×5 cell array
    {'L'}    {'S'}    {'L'}    {'N'}    {'N'}

show(pathSegObj{1})
xlim([0 1.5])
ylim([0 1.5])

Extended Capabilities

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

Introduced in R2018b