gtsam
Loading...
Searching...
No Matches
gtsam::MatrixLieGroup< Class, D, N > Struct Template Reference

Detailed Description

template<class Class, int D, int N>
struct gtsam::MatrixLieGroup< Class, D, N >

A CRTP helper class that implements matrix Lie group methods.

To use, derive from MatrixLieGroup<Class,D,N> instead of LieGroup<Class,D>. Your class must implement a matrix() method and static Hat()/Vee() methods.

Inheritance diagram for gtsam::MatrixLieGroup< Class, D, N >:

Matrix Lie Group

Eigen::Matrix< double, internal::product(N, N), 1 > vec (OptionalJacobian< internal::product(N, N), D > H={}) const
 Vectorize the matrix representation of a Lie group element.
Jacobian AdjointMap () const
 A generic implementation of AdjointMap for matrix Lie groups.
TangentVector Adjoint (const TangentVector &xi, ChartJacobian H_this={}, ChartJacobian H_xi={}) const
 Adjoint action on a tangent vector.
TangentVector AdjointTranspose (const TangentVector &x, ChartJacobian H_this={}, ChartJacobian H_x={}) const
 Dual Adjoint action on a tangent covector.
static Jacobian adjointMap (const TangentVector &xi)
 Lie algebra adjoint map ad_xi, with optional specialization in derived classes.
static TangentVector adjoint (const TangentVector &xi, const TangentVector &y, ChartJacobian Hxi={}, ChartJacobian H_y={})
 Lie algebra action ad_xi(y), with optional Jacobians.
static TangentVector adjointTranspose (const TangentVector &xi, const TangentVector &y, ChartJacobian Hxi={}, ChartJacobian H_y={})
 Dual Lie algebra action ad_xi^T(y), with optional Jacobians.

Public Member Functions

std::enable_if_t< M !=Eigen::Dynamic, int > dim () const
 Provided fixed dimension in dim() if needed.
Public Member Functions inherited from gtsam::LieGroup< Class, D >
std::enable_if_t< M !=Eigen::Dynamic, int > dim () const
 Provided fixed dimension in dim() if needed.
const Class & derived () const
Class compose (const Class &g) const
Class between (const Class &g) const
Class compose (const Class &g, ChartJacobian H1, ChartJacobian H2={}) const
Class between (const Class &g, ChartJacobian H1, ChartJacobian H2={}) const
Class inverse (ChartJacobian H) const
Class expmap (const TangentVector &v) const
 expmap as required by manifold concept Applies exponential map to v and composes with *this
TangentVector logmap (const Class &g) const
 logmap as required by manifold concept Applies logarithmic map to group element that takes *this to g
Class expmap (const TangentVector &v, ChartJacobian H1, ChartJacobian H2={}) const
 expmap with optional derivatives, when the class provides them
TangentVector logmap (const Class &g, ChartJacobian H1, ChartJacobian H2={}) const
 logmap with optional derivatives, when the class provides them
Class retract (const TangentVector &v) const
 retract as required by manifold concept: applies v at *this
TangentVector localCoordinates (const Class &g) const
 localCoordinates as required by manifold concept: finds tangent vector between *this and g
Class retract (const TangentVector &v, ChartJacobian H1, ChartJacobian H2={}) const
 retract with optional derivatives, when the chart provides them
TangentVector localCoordinates (const Class &g, ChartJacobian H1, ChartJacobian H2={}) const
 localCoordinates with optional derivatives, when the chart provides them
SOn compose (const SOn &g, DynamicJacobian H1, DynamicJacobian H2) const
SOn between (const SOn &g, DynamicJacobian H1, DynamicJacobian H2) const
GTSAM_EXPORT SOn compose (const SOn &g, DynamicJacobian H1, DynamicJacobian H2) const
GTSAM_EXPORT SOn between (const SOn &g, DynamicJacobian H1, DynamicJacobian H2) const

Static Public Member Functions

static constexpr int Dim ()
 Static method to get the dimension (compile-time or dynamic).
Static Public Member Functions inherited from gtsam::LieGroup< Class, D >
static constexpr int Dim ()
 Static method to get the dimension (compile-time or dynamic).
static Class Retract (const TangentVector &v)
 Retract at origin: possible in Lie group because it has an identity.
static TangentVector LocalCoordinates (const Class &g)
 LocalCoordinates at origin: possible in Lie group because it has an identity.
static Class Retract (const TangentVector &v, ChartJacobian H)
 Retract at origin with optional derivative, when the chart provides it.
static TangentVector LocalCoordinates (const Class &g, ChartJacobian H)
 LocalCoordinates at origin with optional derivative, when provided.

Static Public Attributes

static constexpr auto dimension
Static Public Attributes inherited from gtsam::LieGroup< Class, D >
static constexpr auto dimension

Public Types

using Base = LieGroup<Class, D>
using ChartJacobian = typename Base::ChartJacobian
using Jacobian = typename Base::Jacobian
using TangentVector = typename Base::TangentVector
using Vectorized = Eigen::Matrix<double, internal::product(N, N), 1>
using VectorizedJacobian
Public Types inherited from gtsam::LieGroup< Class, D >
typedef OptionalJacobian< N, N > ChartJacobian
typedef Eigen::Matrix< double, N, N > Jacobian
typedef Eigen::Matrix< double, N, 1 > TangentVector

Member Typedef Documentation

◆ VectorizedJacobian

template<class Class, int D, int N>
using gtsam::MatrixLieGroup< Class, D, N >::VectorizedJacobian
Initial value:
OptionalJacobian<internal::product(N, N), D>
OptionalJacobian is an Eigen::Ref like class that can take be constructed using either a fixed size o...
Definition OptionalJacobian.h:40

Member Function Documentation

◆ Adjoint()

template<class Class, int D, int N>
TangentVector gtsam::MatrixLieGroup< Class, D, N >::Adjoint ( const TangentVector & xi,
ChartJacobian H_this = {},
ChartJacobian H_xi = {} ) const
inline

Adjoint action on a tangent vector.

Returns Ad_g * xi with optional Jacobians with respect to g and xi.

◆ AdjointMap()

template<class Class, int D, int N>
Jacobian gtsam::MatrixLieGroup< Class, D, N >::AdjointMap ( ) const
inline

A generic implementation of AdjointMap for matrix Lie groups.

The Adjoint map Ad_g is the tangent map of the conjugation C_g(x) = g*x*g.inverse() at the identity. For matrix Lie groups, Ad_g(v) = g*v*g.inverse() where v is an element of the Lie algebra. The columns of the Adjoint matrix are vee(g * Hat(e_i) * g.inverse()) for each basis vector e_i. This method can be overridden by derived classes with a more efficient, closed-form solution.

◆ AdjointTranspose()

template<class Class, int D, int N>
TangentVector gtsam::MatrixLieGroup< Class, D, N >::AdjointTranspose ( const TangentVector & x,
ChartJacobian H_this = {},
ChartJacobian H_x = {} ) const
inline

Dual Adjoint action on a tangent covector.

Returns Ad_g^T * x with optional Jacobians with respect to g and x.

◆ vec()

template<class Class, int D, int N>
Eigen::Matrix< double, internal::product(N, N), 1 > gtsam::MatrixLieGroup< Class, D, N >::vec ( OptionalJacobian< internal::product(N, N), D > H = {}) const
inline

Vectorize the matrix representation of a Lie group element.

The derivative H is the (N*N) x D Jacobian of this vectorization map. It is given by the formula H = (I_N ⊗ T) * P, where T is the N x N matrix of this group element, ⊗ is the Kronecker product, and P is the (N*N) x D matrix whose columns are the vectorized Lie algebra generators vec(Hat(e_j)). This can be computed efficiently via block-wise multiplication.


The documentation for this struct was generated from the following file: