Add relative pose to pose graph
[edge,edgeID] = addRelativePose(___)
relPose— Relative pose between nodes
[x y theta]vector |
[x y z qw qx qy qz]vector
Relative pose between nodes, specified as one of the following:
PoseGraph (2-D), the pose is a
[x y theta]
vector, which defines a xy-position and orientation
PoseGraph3D, the pose is a
[x y z qw qx qy
qz] vector, which defines by an
xyz-position and quaternion orientation,
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
infoMatrix— Information matrix
Information matrix, specified as a 6-element or 21-element vector. This
vector contains the elements of the upper triangle of the square information
matrix (compact form). The information matrix is the inverse of the
covariance of the pose and represents the uncertainty of the measurement. If
the pose vector is
[x y theta], the covariance is a
3-by-3 matrix of pairwise covariance calculations. Typically, the
uncertainty is determined by the sensor model.
PoseGraph (2-D), the information matrix is a six-element
vector. The default is
[1 0 0 1 0 1].
PoseGraph3D, the information matrix is a 21-element vector.
The default is
[1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0 0 1 0
edge— Added edge
Added edge, returned as a two-element vector. An edge is defined by the IDs of the two nodes that it connects with a relative pose.
edgeID— ID of added edge
ID of added edge, returned as a positive integer.
Use this syntax when constructing
PoseGraph3D objects for code generation:
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.