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 fromLieGroup
and that implements the functions defined in this class can be used with the LieGroupOps concept.Note that
LieGroup
is a subclass ofgroup.Group
which is a subclass ofstorage.Storage
, meaning that aLieGroup
object can be also be used with GroupOps and StorageOps (assuming the necessary functions are implemented).- LieGroupT = ~LieGroupT¶
- classmethod from_tangent(vec, epsilon=0.0)[source]¶
Mapping from the tangent space vector about identity into a group element.
- Parameters:
vec (T.Sequence[T.Scalar]) –
epsilon (T.Scalar) –
- Return type:
LieGroupT
- to_tangent(epsilon=0.0)[source]¶
Mapping from this element to the tangent space vector about identity.
- Parameters:
self (LieGroupT) –
epsilon (T.Scalar) –
- Return type:
T.List[T.Scalar]
- 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:
self (LieGroupT) –
vec (T.Sequence[T.Scalar]) –
epsilon (T.Scalar) –
- 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 (T.Scalar) –
- Return type:
T.List[T.Scalar]
- jacobian(X, tangent_space=True)[source]¶
Computes the jacobian of this LieGroup element with respect to the input X, where X is anything that supports LieGroupOps
If tangent_space is True, the jacobian is computed in the local coordinates of the tangent spaces around self and X. If tangent_space is False, the jacobian is computed in the storage spaces of self and X.
See also
symforce.ops.lie_group_ops.LieGroupOps.jacobian()
symforce.jacobian_helpers.tangent_jacobians()
- Returns: the jacobian matrix of shape MxN, where M is the dimension of the tangent (or
storage) space of self and N is the dimension of the tangent (or storage) space of X.
- Parameters:
self (LieGroupT) –
X (T.Any) –
tangent_space (bool) –
- Return type:
geo.Matrix