navlie.lib.states.SE2State¶
- class navlie.lib.states.SE2State(value: ndarray, stamp: float | None = None, state_id=None, direction='right')¶
Bases:
MatrixLieGroupState
A state object for 2D rigid body transformations. The value of this state is stored as a 3x3 numpy array representing a direct element of the SE2 group. I.e.,
\[\mathbf{T} = egin{bmatrix} \mathbf{C} & \mathbf{r} \ \mathbf{0} & 1 \end{bmatrix}, \quad \mathbf{C} \in SO(2), \quad \mathbf{r} \in \mathbb{R}^2.\]- Parameters:
value (np.ndarray) – Value of of the state. If the value has as many elements as the DOF of the group, then it is assumed to be a vector of exponential coordinates. Otherwise, the value must be a 2D numpy array representing a direct element of the group in matrix form.
group (MatrixLieGroup) – A pymlg.MatrixLieGroup class, such as pymlg.SE2 or pymlg.SO3.
stamp (float, optional) – timestamp, by default None
state_id (Any, optional) – optional state ID, by default None
direction (str, optional) –
either “left” or “right”, by default “right”. Defines the perturbation \(\delta \mathbf{x}\) as either
\[ \begin{align}\begin{aligned}\mathbf{X} = \mathbf{X} \exp(\delta \mathbf{x}^\wedge) ext{ (right)}\\\mathbf{X} = \exp(\delta \mathbf{x}^\wedge) \mathbf{X} ext{ (left)}\end{aligned}\end{align} \]
- group¶
- direction¶
- copy() → MatrixLieGroupState¶
Returns a copy of this State instance.
- dot(other: MatrixLieGroupState) → MatrixLieGroupState¶
- minus(x: MatrixLieGroupState) → ndarray¶
A generic “subtraction” operation given another State object of the same type, always returning a numpy array.
- minus_jacobian(x: MatrixLieGroupState) → ndarray¶
Jacobian of the
minus
operator with respect to self.\[\mathbf{J} = \frac{D (\mathcal{Y} \ominus \mathcal{X})}{D \mathcal{Y}}\]That is, if
dx = y.minus(x)
then this is the Jacobian ofdx
with respect toy
. For Lie groups, this is the inverse of the group Jacobian evaluated atdx = x1.minus(x2)
.
- minus_jacobian_fd(x: State, step_size=1e-08) → ndarray¶
Calculates the minus jacobian with finite difference.
- plus(dx: ndarray) → MatrixLieGroupState¶
A generic “addition” operation given a
dx
numpy array with as many elements as thedof
of this state.
- plus_jacobian(dx: ndarray) → ndarray¶
Jacobian of the
plus
operator. That is, using Lie derivative notation,\[\mathbf{J} = \frac{D (\mathcal{X} \oplus \delta \mathbf{x})}{D \delta \mathbf{x}}\]For Lie groups, this is known as the group Jacobian.
- plus_jacobian_fd(dx, step_size=1e-08) → ndarray¶
Calculates the plus jacobian with finite difference.
- state_id¶