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 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 ... ] (1x256 double) 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 142 143 144 146 147 148 150 151 204 205 207 208 209 211 212 213 215 216 217 218 220 221 222 223 225 226 227 228 230 231 232 233 235 236 237 238 240 241 242 243 244 ... ] (1x4615 double) 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'
| '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.'off'
— Do not plot any IDs.
Output Arguments
Version History
Introduced in R2019b
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)