Main Content

edgeNodePairs

Edge node pairs in pose graph

Description

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.

Input Arguments

collapse all

Pose graph, specified as a poseGraph or poseGraph3D object.

Edge IDs, specified as a vector of positive integers.

Output Arguments

collapse all

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.

Compatibility Considerations

expand all

Behavior change in future release

Extended Capabilities

Introduced in R2019b