symforce.geo.pose2 module¶
- class Pose2(R=None, t=None)[source]¶
- Bases: - LieGroup- 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:
- R (T.Optional[Rot2]) – 
- t (T.Optional[Vector2]) – 
 
 - Pose2T = ~Pose2T¶
 - rotation()[source]¶
- Accessor for the rotation component - Does not make a copy. Also accessible as - self.R- Return type:
 
 - position()[source]¶
- Accessor for the position component - Does not make a copy. Also accessible as - self.t- Return type:
 
 - to_storage()[source]¶
- Flat list representation of the underlying storage, length of - storage_dim(). This is used purely for plumbing, it is NOT like a tangent space.
 - classmethod from_storage(vec)[source]¶
- Construct from a flat list representation. Opposite of - to_storage().
 - classmethod symbolic(name, **kwargs)[source]¶
- Construct a symbolic element with the given name prefix. Kwargs are forwarded to - sf.Symbol(for example, sympy assumptions).- Parameters:
- name (str) – 
- kwargs (T.Any) – 
 
- Return type:
- Pose2T 
 
 - classmethod from_tangent(v, epsilon=0.0)[source]¶
- Mapping from the tangent space vector about identity into a group element. 
 - to_tangent(epsilon=0.0)[source]¶
- Mapping from this element to the tangent space vector about identity. 
 - storage_D_tangent(epsilon=0.0)[source]¶
- Note: generated from - symforce/notebooks/storage_D_tangent.ipynb
 - tangent_D_storage(epsilon=0.0)[source]¶
- Note: generated from - symforce/notebooks/tangent_D_storage.ipynb
 - retract(vec, epsilon=0.0)[source]¶
- Applies a tangent space perturbation vec to self. Often used in optimization to update nonlinear values from an update step in the tangent space. - Conceptually represents - self + vecif self is a vector.- Implementation retracts the R and t components separately, which is different from - compose(self, from_tangent(vec)). See the class docstring for more information.
 - local_coordinates(b, epsilon=0.0)[source]¶
- Computes a tangent space perturbation around self to produce b. Often used in optimization to minimize the distance between two group elements. - Tangent space perturbation that conceptually represents - b - selfif self is a vector.- Implementation takes local_coordinates of the R and t components separately, which is different from - to_tangent(between(self, b)). See the class docstring for more information.- Parameters:
- self (Pose2T) – 
- b (Pose2T) – 
- epsilon (T.Scalar) – 
 
- Return type:
- T.List[T.Scalar]