hpp::pinocchio::LiegroupSpace Class Reference

Cartesian product of elementary Lie groups. More...

#include <hpp/pinocchio/liegroup-space.hh>

Public Member Functions

size_type nq () const
 Dimension of the vector representation. More...
 
size_type nv () const
 Dimension of the Lie group tangent space. More...
 
size_type nq (const std::size_t &rank) const
 Dimension of elementary Liegroup at given rank. More...
 
size_type nv (const std::size_t &rank) const
 Dimension of elementary Liegroup tangent space at given rank. More...
 
const std::vector< LiegroupType > & liegroupTypes () const
 Get reference to vector of elementary types. More...
 
LiegroupElement neutral () const
 Return the neutral element as a vector. More...
 
LiegroupElement element (vectorIn_t q) const
 Create a LiegroupElement from a configuration. More...
 
LiegroupElementRef elementRef (vectorOut_t q) const
 Create a LiegroupElementRef from a configuration. More...
 
LiegroupElementConstRef elementConstRef (vectorIn_t q) const
 Create a LiegroupElementRef from a configuration. More...
 
LiegroupElement exp (vectorIn_t v) const
 Return exponential of a tangent vector. More...
 
template<DerivativeProduct side>
void dIntegrate_dq (LiegroupElementConstRef q, vectorIn_t v, matrixOut_t Jq) const
 Compute the Jacobian of the integration operation with respect to q. More...
 
template<DerivativeProduct side>
void dIntegrate_dv (LiegroupElementConstRef q, vectorIn_t v, matrixOut_t Jv) const
 Compute the Jacobian of the integration operation with respect to v. More...
 
template<bool ApplyOnTheLeft>
void Jdifference (vectorIn_t q0, vectorIn_t q1, matrixOut_t J0, matrixOut_t J1) const
 
template<DerivativeProduct side>
void dDifference_dq0 (vectorIn_t q0, vectorIn_t q1, matrixOut_t J0) const
 Compute the Jacobian matrices of the difference operation. More...
 
template<DerivativeProduct side>
void dDifference_dq1 (vectorIn_t q0, vectorIn_t q1, matrixOut_t J1) const
 Compute the Jacobian matrices of the difference operation. More...
 
std::string name () const
 Return name of Lie group. More...
 
void mergeVectorSpaces ()
 
LiegroupSpacePtr_t vectorSpacesMerged () const
 
bool isVectorSpace () const
 
bool operator== (const LiegroupSpace &other) const
 
bool operator!= (const LiegroupSpace &other) const
 
LiegroupSpacePtr_t operator*= (const LiegroupSpaceConstPtr_t &other)
 

Static Public Member Functions

static LiegroupSpacePtr_t create (const size_type &size)
 Create instance of vector space of given size. More...
 
static LiegroupSpacePtr_t createCopy (const LiegroupSpaceConstPtr_t &other)
 Create copy. More...
 
static LiegroupSpacePtr_t create (const LiegroupType &type)
 Create instance with one Elementary Lie group. More...
 
Elementary Lie groups
static LiegroupSpacePtr_t Rn (const size_type &n)
 Return \(\mathbf{R}^n\) as a Lie group. More...
 
static LiegroupSpacePtr_t R1 ()
 Return \(\mathbf{R}\) as a Lie group. More...
 
static LiegroupSpacePtr_t R2 ()
 Return \(\mathbf{R}^2\) as a Lie group. More...
 
static LiegroupSpacePtr_t R3 ()
 Return \(\mathbf{R}^3\) as a Lie group. More...
 
static LiegroupSpacePtr_t SE2 ()
 Return \(SE(2)\). More...
 
static LiegroupSpacePtr_t SE3 ()
 Return \(SE(3)\). More...
 
static LiegroupSpacePtr_t SO2 ()
 Return \(SO(2)\). More...
 
static LiegroupSpacePtr_t SO3 ()
 Return \(SO(3)\). More...
 
static LiegroupSpacePtr_t R2xSO2 ()
 Return \(\mathbf{R}^2 \times SO(2)\). More...
 
static LiegroupSpacePtr_t R3xSO3 ()
 Return \(\mathbf{R}^3 \times SO(3)\). More...
 
static LiegroupSpacePtr_t empty ()
 Return empty Lie group. More...
 

Protected Member Functions

 LiegroupSpace (const size_type &size)
 Constructor of vector space of given size. More...
 
 LiegroupSpace (const LiegroupSpace &other)
 
 LiegroupSpace (const LiegroupType &type)
 

Detailed Description

Cartesian product of elementary Lie groups.

Some values produced and manipulated by functions belong to Lie groups For instance rotations, rigid-body motions are element of Lie groups.

Elements of Lie groups are usually applied common operations, like

  • integrating a velocity from a given element during unit time,
  • computing the constant velocity that moves from one element to another one in unit time.

By analogy with vector spaces that are a particular type of Lie group, the above operations are implemented as operators + and - respectively acting on LiegroupElement instances.

This class represents a Lie group as the cartesian product of elementaty Lie groups. Those elementary Lie groups are gathered in a variant called LiegroupType.

Elements of a Lie group are represented by class LiegroupElement.

Constructor & Destructor Documentation

◆ LiegroupSpace() [1/3]

hpp::pinocchio::LiegroupSpace::LiegroupSpace ( const size_type size)
protected

Constructor of vector space of given size.

◆ LiegroupSpace() [2/3]

hpp::pinocchio::LiegroupSpace::LiegroupSpace ( const LiegroupSpace other)
protected

◆ LiegroupSpace() [3/3]

hpp::pinocchio::LiegroupSpace::LiegroupSpace ( const LiegroupType type)
protected

Member Function Documentation

◆ create() [1/2]

static LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::create ( const size_type size)
inlinestatic

Create instance of vector space of given size.

References createCopy().

◆ create() [2/2]

static LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::create ( const LiegroupType type)
inlinestatic

Create instance with one Elementary Lie group.

◆ createCopy()

static LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::createCopy ( const LiegroupSpaceConstPtr_t other)
inlinestatic

Create copy.

Referenced by create().

◆ dDifference_dq0()

template<DerivativeProduct side>
void hpp::pinocchio::LiegroupSpace::dDifference_dq0 ( vectorIn_t  q0,
vectorIn_t  q1,
matrixOut_t  J0 
) const

Compute the Jacobian matrices of the difference operation.

Given \( \mathbf{v} = \mathbf{q}_1 - \mathbf{q}_0 \),

Compute matrices \(J_{0}\) and \(J_{1}\) such that

\begin{equation} \dot{\mathbf{v}} = J_{0}\dot{\mathbf{q}_0} + J_{1}\dot{\mathbf{q}_1} \end{equation}

Parameters
[in]q0,q1Lie group elements,
[out]J0the Jacobian of v with respect to q0.

Referenced by liegroupTypes().

◆ dDifference_dq1()

template<DerivativeProduct side>
void hpp::pinocchio::LiegroupSpace::dDifference_dq1 ( vectorIn_t  q0,
vectorIn_t  q1,
matrixOut_t  J1 
) const

Compute the Jacobian matrices of the difference operation.

Given \( \mathbf{v} = \mathbf{q}_1 - \mathbf{q}_0 \),

Compute matrices \(J_{0}\) and \(J_{1}\) such that

\begin{equation} \dot{\mathbf{v}} = J_{0}\dot{\mathbf{q}_0} + J_{1}\dot{\mathbf{q}_1} \end{equation}

Parameters
[in]q0,q1Lie group elements,
[out]J1the Jacobian of v with respect to q1.

Referenced by liegroupTypes().

◆ dIntegrate_dq()

template<DerivativeProduct side>
void hpp::pinocchio::LiegroupSpace::dIntegrate_dq ( LiegroupElementConstRef  q,
vectorIn_t  v,
matrixOut_t  Jq 
) const

Compute the Jacobian of the integration operation with respect to q.

Given \( \mathbf{p} = \mathbf{q} + \mathbf{v} \), compute \(J_{\mathbf{q}}\) such that

\begin{equation} \dot{\mathbf{p}} = J_{\mathbf{q}}\dot{\mathbf{q}} \end{equation}

for constant \(\mathbf{v}\)

Parameters
qthe configuration,
vthe velocity vector,
Return values
Jqthe Jacobian (initialized as identity)
Note
For each elementary Lie group in q.space (), ranging over indices \([iq, iq+nq-1]\), the Jacobian \(J_{Lg} (q [iq:iq+nq])\) is computed by method ::pinocchio::LieGroupBase::dIntegrate_dq. lines \([iq:iq+nq]\) of Jq are then left multiplied by \(J_{Lg} (q [iq:iq+nq])\).

Referenced by liegroupTypes().

◆ dIntegrate_dv()

template<DerivativeProduct side>
void hpp::pinocchio::LiegroupSpace::dIntegrate_dv ( LiegroupElementConstRef  q,
vectorIn_t  v,
matrixOut_t  Jv 
) const

Compute the Jacobian of the integration operation with respect to v.

Given \( \mathbf{p} = \mathbf{q} + \mathbf{v} \), compute \(J_{\mathbf{v}}\) such that

\begin{equation} \dot{\mathbf{p}} = J_{\mathbf{v}}\dot{\mathbf{v}} \end{equation}

for constant \(\mathbf{q}\)

Parameters
qthe configuration,
vthe velocity vector,
Return values
Jvthe Jacobian (initialized to identity)
Note
For each elementary Lie group in q.space (), ranging over indices \([iv, iv+nv-1]\), the Jacobian \(J_{Lg} (q [iv:iv+nv])\) is computed by method ::pinocchio::LieGroupBase::dIntegrate_dq. lines \([iv:iv+nv]\) of Jv are then left multiplied by \(J_{Lg} (q [iv:iv+nv])\).

Referenced by liegroupTypes().

◆ element()

LiegroupElement hpp::pinocchio::LiegroupSpace::element ( vectorIn_t  q) const

Create a LiegroupElement from a configuration.

Referenced by liegroupTypes().

◆ elementConstRef()

LiegroupElementConstRef hpp::pinocchio::LiegroupSpace::elementConstRef ( vectorIn_t  q) const

Create a LiegroupElementRef from a configuration.

Referenced by liegroupTypes().

◆ elementRef()

LiegroupElementRef hpp::pinocchio::LiegroupSpace::elementRef ( vectorOut_t  q) const

Create a LiegroupElementRef from a configuration.

Referenced by liegroupTypes().

◆ empty()

static LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::empty ( )
static

Return empty Lie group.

◆ exp()

LiegroupElement hpp::pinocchio::LiegroupSpace::exp ( vectorIn_t  v) const

Return exponential of a tangent vector.

Referenced by liegroupTypes().

◆ isVectorSpace()

bool hpp::pinocchio::LiegroupSpace::isVectorSpace ( ) const

Referenced by liegroupTypes().

◆ Jdifference()

template<bool ApplyOnTheLeft>
void hpp::pinocchio::LiegroupSpace::Jdifference ( vectorIn_t  q0,
vectorIn_t  q1,
matrixOut_t  J0,
matrixOut_t  J1 
) const
Deprecated:
Use dDifference_dq0 and dDifference_dq1

Referenced by liegroupTypes().

◆ liegroupTypes()

const std::vector<LiegroupType>& hpp::pinocchio::LiegroupSpace::liegroupTypes ( ) const
inline

◆ mergeVectorSpaces()

void hpp::pinocchio::LiegroupSpace::mergeVectorSpaces ( )

Referenced by liegroupTypes().

◆ name()

std::string hpp::pinocchio::LiegroupSpace::name ( ) const

Return name of Lie group.

Referenced by liegroupTypes(), and hpp::pinocchio::operator<<().

◆ neutral()

LiegroupElement hpp::pinocchio::LiegroupSpace::neutral ( ) const

Return the neutral element as a vector.

Referenced by liegroupTypes().

◆ nq() [1/2]

size_type hpp::pinocchio::LiegroupSpace::nq ( ) const
inline

Dimension of the vector representation.

Referenced by nv().

◆ nq() [2/2]

size_type hpp::pinocchio::LiegroupSpace::nq ( const std::size_t &  rank) const

Dimension of elementary Liegroup at given rank.

◆ nv() [1/2]

size_type hpp::pinocchio::LiegroupSpace::nv ( ) const
inline

Dimension of the Lie group tangent space.

References nq().

◆ nv() [2/2]

size_type hpp::pinocchio::LiegroupSpace::nv ( const std::size_t &  rank) const

Dimension of elementary Liegroup tangent space at given rank.

◆ operator!=()

bool hpp::pinocchio::LiegroupSpace::operator!= ( const LiegroupSpace other) const

Referenced by liegroupTypes().

◆ operator*=()

LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::operator*= ( const LiegroupSpaceConstPtr_t other)

Referenced by liegroupTypes().

◆ operator==()

bool hpp::pinocchio::LiegroupSpace::operator== ( const LiegroupSpace other) const

Referenced by liegroupTypes().

◆ R1()

static LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::R1 ( )
static

Return \(\mathbf{R}\) as a Lie group.

◆ R2()

static LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::R2 ( )
static

Return \(\mathbf{R}^2\) as a Lie group.

◆ R2xSO2()

static LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::R2xSO2 ( )
static

Return \(\mathbf{R}^2 \times SO(2)\).

◆ R3()

static LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::R3 ( )
static

Return \(\mathbf{R}^3\) as a Lie group.

◆ R3xSO3()

static LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::R3xSO3 ( )
static

Return \(\mathbf{R}^3 \times SO(3)\).

◆ Rn()

static LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::Rn ( const size_type n)
static

Return \(\mathbf{R}^n\) as a Lie group.

Parameters
ndimension of vector space

◆ SE2()

static LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::SE2 ( )
static

Return \(SE(2)\).

◆ SE3()

static LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::SE3 ( )
static

Return \(SE(3)\).

◆ SO2()

static LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::SO2 ( )
static

Return \(SO(2)\).

◆ SO3()

static LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::SO3 ( )
static

Return \(SO(3)\).

◆ vectorSpacesMerged()

LiegroupSpacePtr_t hpp::pinocchio::LiegroupSpace::vectorSpacesMerged ( ) const

Referenced by liegroupTypes().