show
Plot pose graph
Description
show(
specifies options using poseGraph
,Name,Value
)Name,Value
pair arguments. For example,
'IDs','on'
plots all node and edge IDs of the pose
graph.
returns the
axes handle that the pose graph is plotted to using any of previous syntaxes.axes
= show(___)
Examples
Optimize a 2-D Pose Graph
Optimize a pose graph based on the nodes and edge constraints. The pose graph used in this example is from the Intel Research Lab Dataset and was generated from collecting wheel odometry and a laser range finder sensor information in an indoor lab.
Load the Intel data set that contains a 2-D pose graph. Inspect the poseGraph
object to view the number of nodes and loop closures.
load intel-2d-posegraph.mat pg disp(pg)
poseGraph with properties: NumNodes: 1228 NumEdges: 1483 NumLoopClosureEdges: 256 LoopClosureEdgeIDs: [1228 1229 1230 1231 1232 1233 1234 1235 1236 ... ] LandmarkNodeIDs: [1x0 double]
Plot the pose graph with IDs off. Red lines indicate loop closures identified in the dataset.
show(pg,'IDs','off'); title('Original Pose Graph')
Optimize the pose graph. Nodes are adjusted based on the edge constraints and loop closures. Plot the optimized pose graph to see the adjustment of the nodes with loop closures.
updatedPG = optimizePoseGraph(pg); figure show(updatedPG,'IDs','off'); title('Updated Pose Graph')
Optimize a 3-D Pose Graph
Optimize a pose graph based on the nodes and edge constraints. The pose graph used in this example is taken from the MIT Dataset and was generated using information extracted from a parking garage.
Load the pose graph from the MIT dataset. Inspect the poseGraph3D
object to view the number of nodes and loop closures.
load parking-garage-posegraph.mat pg disp(pg);
poseGraph3D with properties: NumNodes: 1661 NumEdges: 6275 NumLoopClosureEdges: 4615 LoopClosureEdgeIDs: [128 129 130 132 133 134 135 137 138 139 140 ... ] LandmarkNodeIDs: [1x0 double]
Plot the pose graph with IDs off. Red lines indicate loop closures identified in the dataset.
title('Original Pose Graph') show(pg,'IDs','off'); view(-30,45)
Optimize the pose graph. Nodes are adjusted based on the edge constraints and loop closures. Plot the optimized pose graph to see the adjustment of the nodes with loop closures.
updatedPG = optimizePoseGraph(pg); figure title('Updated Pose Graph') show(updatedPG,'IDs','off'); view(-30,45)
Input Arguments
poseGraph
— Pose graph
poseGraph
object | poseGraph3D
object
Pose graph, specified as a poseGraph
or poseGraph3D
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: 'IDs','off'
IDs
— Display of IDs on pose graph
'loopclosures'
(default) | 'all'
| 'nodes'
| 'landmarks'
| 'off'
Display of IDs on pose graph, specified as the comma-separated pair
consisting of 'IDs'
and one of the following:
'all'
— Plot all node and edge IDs.'nodes'
— Plot all node IDs and loop closure IDs.'loopclosures'
— Plot only loop closure edge IDs.'landmarks'
— Plot landmark edge IDs.'off'
— Do not plot any IDs.
Output Arguments
Version History
Introduced in R2019b
Ouvrir l'exemple
Vous possédez une version modifiée de cet exemple. Souhaitez-vous ouvrir cet exemple avec vos modifications ?
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
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)