Main Content

factorTwoPoseSE2

Factor relating two SE(2) poses

Description

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

Creation

Description

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

example

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].

Properties

expand all

This property is read-only.

Node ID numbers, specified as a two-element row vector of integers.

If there are no nodes in the factor graph with the specified ID, nodes with the specified IDs are automatically created and added to the factor graph when this factor is added to the factor graph.

You must specify this property at object creation.

Data Types: int

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

Data Types: double

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

Data Types: double

Object Functions

nodeTypeGet node type of node in factor graph

Examples

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;
addFactor(g,f);

Extended Capabilities

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

Version History

Introduced in R2022a