This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Package: robotics

Poses of nodes in pose graph


nodes = nodes(poseGraph)
nodes = nodes(poseGraph,nodeIDs)


nodes = nodes(poseGraph) lists all poses in the specified pose graph.

nodes = nodes(poseGraph,nodeIDs) lists the poses with the specified node IDs.

Input Arguments

collapse all

Pose graph, specified as a PoseGraph or PoseGraph3D object.

Node IDs, specified as a positive integer or vector of positive integers. Each node added gets an ID sequentially in the graph.

Output Arguments

collapse all

Pose of each node, specified as an n-by-3 or n-by-7 matrix. These poses are given in global coordinates for the whole pose graph.

For PoseGraph (2-D), each row is an [x y theta] vector, which defines the relative xy-position and orientation angle, theta, of a pose in the graph.

For PoseGraph3D, each row is an [x y z qw qx qy qz] vector, which defines the relative xyz-position and quaternion orientation, [qw qx qy qz], of a pose in the graph.


Many other sources for 3-D pose graphs, including .g2o formats, specify the quaternion orientation in a different order, for example, [qx qy qz qw]. Check the source of your pose graph data before adding nodes to your PoseGraph3D object.

Extended Capabilities

Introduced in R2018a