show
Visualize UAV Dubins path segment
Description
plots the path segment with start and goal positions and the transitions between the motion types.axHandle
= show(pathSegObj
)
Note
Plotting uses only the position and the yaw angle.
specifies additional name-value pair arguments to control display settings.axHandle
= show(pathSegObj
,Name,Value
)
Examples
Connect Poses Using UAV Dubins Connection Path
This example shows how to calculate a UAV Dubins path segment and connect poses using the uavDubinsConnection
object.
Create a uavDubinsConnection
object.
connectionObj = uavDubinsConnection;
Define start and goal poses as [x
, y
, z
, headingAngle
] vectors.
startPose = [0 0 0 0]; % [meters, meters, meters, radians]
goalPose = [0 0 20 pi];
Calculate a valid path segment and connect the poses. Returns a path segment object with the lowest path cost.
[pathSegObj,pathCosts] = connect(connectionObj,startPose,goalPose);
Show the generated path.
show(pathSegObj{1})
Display the motion type and the path cost of the generated path.
fprintf('Motion Type: %s\nPath Cost: %f\n',strjoin(pathSegObj{1}.MotionTypes),pathCosts);
Motion Type: R L R N Path Cost: 138.373157
Input Arguments
pathSegObj
— Path segment
uavDubinsPathSegment
object
Path segment, specified as a uavDubinsPathSegment
object.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'Positions',{'start','goal'}
Parent
— Axes used to plot path
Axes
object
Axes used to plot path, specified as the comma-separated pair consisting of
'Parent'
and an axes
object.
Example: 'Parent',axHandle
Positions
— Positions to display
{'start','goal','transitions'}
(default) | cell array of string or character vectors or vector of string scalars
Positions to display, specified as the comma-separated pair consisting of
'Positions'
and a cell array of string or character vectors or a
vector of string scalars.
Options are any combination of 'start'
,
'goal'
, and 'transitions'
.
To disable all position displays, specify either as an empty cell array
{}
or empty vector []
.
Output Arguments
axHandle
— Axes used to plot path
Axes
object
Axes used to plot path, returned as an axes
object.
Version History
Introduced in R2019b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)