nodePairs = edgeNodePairs(poseGraph)
returns all edges in the specified pose graph as a list of node ID pairs. Each row
of the edges output is a pair of nodes that form an edge.
Multiple edges may exist between the same pair of nodes.
nodePairs = edgeNodePairs(poseGraph,edgeIDs)
returns edges corresponding to the specified edge IDs. Each edge in the pose graph
has a unique ID even if the node pairs are the same.
This example shows how to identify and remove spurious loop closures from pose graph. To do this, you can modify the relative pose of a loop closure edge and try optimizing the pose graph with and without removing the auto spurious loop closure and compare the results.
Load the Intel Research Lab Dataset that contains a 2-D pose graph. Optimize the pose graph. Plot the pose graph with IDs off. Red lines indicate loop closures identified in the dataset.
Certain loop closures should be trimmed from the pose graph. Use the trimLoopClosures function to trim these bad loop closures. Set the truncation threshold and maximum iterations for the trimmer parameters.
Edge node pairs in pose graph, returned as n-by-2
matrix that lists the IDs of the two nodes that each edge connects. Each row
is a pair of nodes that form an edge. Multiple edges may exist between the
same pair of nodes, so the matrix may contain duplicate entries.
Use this syntax when constructing poseGraph or
poseGraph3D objects for code generation:
poseGraph =
poseGraph('MaxNumEdges',maxEdges,'MaxNumNodes',maxNodes) specifies an
upper bound on the number of edges and nodes allowed in the pose graph when
generating code. This limit is only required when generating code.
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: United States.
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.