# 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

### Syntax

``F = factorTwoPoseSE2(nodeID)``
``F = factorTwoPoseSE2(nodeID,Name=Value)``

### 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

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

 `nodeType` Get 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);```

## Version History

Introduced in R2022a