sym.pose2 module#

class Pose2(R=None, t=None)[source]#

Bases: object

Autogenerated Python implementation of symforce.geo.pose2.Pose2.

Group of two-dimensional rigid body transformations - R2 x SO(2).

The storage space is a complex (real, imag) for rotation followed by a position (x, y).

The tangent space is one angle for rotation followed by two elements for translation in the non-rotated frame.

For Lie group enthusiasts: This class is on the PRODUCT manifold. On this class, the group operations (e.g. compose and between) operate as you’d expect for a Pose or SE(2), but the manifold operations (e.g. retract and local_coordinates) operate on the product manifold SO(2) x R2. This means that:

  • retract(a, vec) != compose(a, from_tangent(vec))

  • local_coordinates(a, b) != to_tangent(between(a, b))

  • There is no hat operator, because from_tangent/to_tangent is not the matrix exp/log

If you need a type that has these properties in symbolic expressions, you should use symforce.geo.unsupported.pose2_se2.Pose2_SE2. There is no runtime equivalent of Pose2_SE2, see the docstring on that class for more information.

Parameters:
data#
property R: Rot2#

Accessor for the rotation component, equivalent to self.rotation()

property t: ndarray#

Accessor for the position component, equivalent to self.position()

rotation()[source]#
Return type:

Rot2

rotation_storage()[source]#

Returns the rotational component of this pose.

Return type:

ndarray

position()[source]#

Returns the positional component of this pose.

Return type:

ndarray

compose_with_point(right)[source]#

Left-multiply with a compatible quantity.

Parameters:

right (Pose2) –

Return type:

ndarray

inverse_compose(point)[source]#

Returns self.inverse() * point

This is more efficient than calling the generated inverse and compose methods separately, if doing this for one point.

Parameters:

point (Pose2) –

Return type:

ndarray

to_homogenous_matrix()[source]#

A matrix representation of this element in the Euclidean space that contains it.

Returns:

3x3 Matrix

Return type:

ndarray

static storage_dim()[source]#
Return type:

int

to_storage()[source]#
Return type:

List[float]

classmethod from_storage(vec)[source]#
Parameters:

vec (Sequence[float]) –

Return type:

Pose2

classmethod identity()[source]#
Return type:

Pose2

inverse()[source]#
Return type:

Pose2

compose(b)[source]#
Parameters:

b (Pose2) –

Return type:

Pose2

between(b)[source]#
Parameters:

b (Pose2) –

Return type:

Pose2

static tangent_dim()[source]#
Return type:

int

classmethod from_tangent(vec, epsilon=1e-08)[source]#
Parameters:
Return type:

Pose2

to_tangent(epsilon=1e-08)[source]#
Parameters:

epsilon (float) –

Return type:

ndarray

retract(vec, epsilon=1e-08)[source]#
Parameters:
Return type:

Pose2

local_coordinates(b, epsilon=1e-08)[source]#
Parameters:
Return type:

ndarray

interpolate(b, alpha, epsilon=1e-08)[source]#
Parameters:
Return type:

Pose2