symforce.ops.interfaces.lie_group module#

class LieGroup[source]#

Bases: Group

Interface for objects that implement the lie group concept. Because this class is registered using symforce.ops.impl.class_lie_group_ops.ClassLieGroupOps (see bottom of this file), any object that inherits from LieGroup and that implements the functions defined in this class can be used with the LieGroupOps concept.

Note that LieGroup is a subclass of group.Group which is a subclass of storage.Storage, meaning that a LieGroup object can be also be used with GroupOps and StorageOps (assuming the necessary functions are implemented).

LieGroupT = ~LieGroupT#
classmethod tangent_dim()[source]#

Dimension of the embedded manifold

Return type:

int

classmethod from_tangent(vec, epsilon=0.0)[source]#

Mapping from the tangent space vector about identity into a group element.

Parameters:
Return type:

LieGroupT

to_tangent(epsilon=0.0)[source]#

Mapping from this element to the tangent space vector about identity.

Parameters:
  • self (LieGroupT) –

  • epsilon (float) –

Return type:

List[float]

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.

Implementation is simply compose(self, from_tangent(vec)). Conceptually represents “self + vec” if self is a vector.

Parameters:
Return type:

LieGroupT

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.

Implementation is simply to_tangent(between(self, b)). Tangent space perturbation that conceptually represents “b - self” if self is a vector.

Parameters:
  • self (LieGroupT) –

  • b (LieGroupT) –

  • epsilon (float) –

Return type:

List[float]