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.

edgeConstraints

Package: robotics

Edge constraints in pose graph

Syntax

relPoses = edgeConstraints(poseGraph)
[relPoses,infoMatrices] = edgeConstraints(poseGraph)
[relPoses,infoMatrices] = edgeConstraints(poseGraph,edgeIDs)

Description

relPoses = edgeConstraints(poseGraph) lists all edge constraints in the specified pose graph as a relative pose.

[relPoses,infoMatrices] = edgeConstraints(poseGraph) also returns the information matrices for each edge. The information matrix is the inverse of the covariance of the pose measurement.

[relPoses,infoMatrices] = edgeConstraints(poseGraph,edgeIDs) returns edge constraints for the specified edge IDs.

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

Relative poses measured between nodes, returned as an n-by-3 matrix or n-by-7 matrix.

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.

Note

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.

Information matrices, specified in compact form as a n-by-6 or n-by-21 matrix, where n is the number of poses in the pose graph.

Each row is a vector that contains the elements of the upper triangle of the square information matrix. 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.

For PoseGraph (2-D), each information matrix is a six-element vector. The default is [1 0 0 1 0 1].

For PoseGraph3D, each 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 1].

Extended Capabilities

Introduced in R2018a