Main Content


Factor relating two SE(2) poses


The factorTwoPoseSE2 object relates two poses in the SE(2) state space for a factorGraph object.



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


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


expand all

This property is read-only.

ID numbers of connected nodes in the factor graph, specified as a two-element row vector of integers.

You must specify this property at object creation.

Measured relative pose, specified as a three-element row vector of the form [x y theta].

Information matrix associated with the measurement, specified as a 3-by-3 matrix.

Object Functions

nodeTypeGet node type of node in factor graph


collapse all

Create measurement vector, information matrix, and a node ID number vector. Create a factorTwoPoseSE2 object, specifying the node IDs, measurement, and information as arguments.

nodeID = [1 2];
measure = [5 5 pi/2];
info = rand(3,3);
f = factorTwoPoseSE2(nodeID,Measurement=measure,Information=info);

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

g = factorGraph;

Version History

Introduced in R2022a