Main Content


Factor relating two SE(3) poses

Since R2022a


The factorTwoPoseSE3 object contains factors that relate pairs of poses in the SE(3) state space for a factorGraph object.




F = factorTwoPoseSE3(nodeID) creates a factorTwoPoseSE3 object, F, with the node identification numbers property NodeID set to nodeID.

F = factorTwoPoseSE3(nodeID,Name=Value) specifies properties using one or more name-value arguments. For example, factorTwoPoseSE3([1 2],Measurement=[1 2 3 4 5 6 7]) sets the Measurement property of the factorTwoPoseSE3 object to [1 2 3 4 5 6 7].


expand all

This property is read-only.

Node ID numbers, specified as an N-by-2 matrix of nonnegative integers, where N is the total number of desired factors. Each row represents a factor that connects to two nodes of type, POSE_SE3, at the specified node IDs in the factor graph. The rows are of the form [PoseID1 PoseID2].

If a factor in the factorTwoPoseSE3 object specifies an ID that does not correspond to a node in the factor graph, the factor graph automatically creates a node of the required type with that ID and adds it to the factor graph when adding the factor to the factor graph.

You must specify this property at object creation.

For more information about the expected node types of all supported factors, see Expected Node Types of Factor Objects.

Measured relative pose, specified as a N-by-7 matrix, where each row is of the form [dx dy dz dqw dqx dqy dqz]. N is the total number of factors. dx, dy, and dz are the change in position in x, y, and z respectively. dqw, dqx, dqy, and dqz are the change in quaternion rotation in w, x, y, and z, respectively.

When you optimize the factor graph that this factor belongs to, the optimize function normalizes the quaternion measurement of the factor before the optimization.

Information matrices associated with the measurements, specified as a 6-by-6 matrix or a 6-by-6-by-N array. N is the total number of factors specified by the factorTwoPoseSE3 object. Each information matrix corresponds to the measurements of the corresponding node in NodeID.

If you specify this property as a 6-by-6 matrix when NodeID contains more than one row, the information matrix corresponds to all measurements in Measurement.

Object Functions

nodeTypeGet node type of node in factor graph


collapse all

Create a two pose SE(3) state space factor with the connected node IDs set to 1 and 2.

f = factorTwoPoseSE3([1 2]);

Create a default factor graph and add the factor to the graph using the addFactor function.

g = factorGraph;

More About

expand all

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2022a

expand all