Poses of nodes in pose graph
Add Landmark Point Node to Pose Graph
Create a 2-D pose graph object.
pg = poseGraph;
Add relative poses to the pose graph.
addRelativePose(pg,[1 1 pi/2]); addRelativePose(pg,[2 2 pi/3]);
Add a landmark point node to the last pose node in the pose graph.
addPointLandmark(pg,[1 1]); show(pg);
List all poses in the pose graph.
ans = 4×3 0 0 0 1.0000 1.0000 1.5708 -1.0000 3.0000 2.6180 -2.3660 2.6340 NaN
nodeIDs — Node IDs
positive integer | vector of positive integers
Node IDs, specified as a positive integer or vector of positive integers. Each node added gets an ID sequentially in the graph.
measurements — Measurements between nodes
n-by-3 matrix | n-by-7 matrix
Measurements between nodes, returned as an n-by-3 matrix or n-by-7 matrix.
poseGraph (2-D), each row is an
[x y theta]
vector, which defines the relative xy-position and
theta, of a pose in the graph. For
theta is returned as
poseGraph3D, each row is an
[x y z qw qx qy
qz] vector, which defines the relative
xyz-position and quaternion orientation,
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
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Use this syntax when constructing
poseGraph3D objects for code generation:
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.
Version HistoryIntroduced in R2019b
nodeEstimates was renamed
nodeEstimates object function was renamed from
nodeEstimates when calling