hpp::constraints::RelativeCom Class Reference

Constraint on the relative position of the center of mass. More...

#include <hpp/constraints/relative-com.hh>

Inheritance diagram for hpp::constraints::RelativeCom:
Collaboration diagram for hpp::constraints::RelativeCom:

Public Member Functions

virtual ~RelativeCom () throw ()
 
 RelativeCom (const DevicePtr_t &robot, const CenterOfMassComputationPtr_t &comc, const JointPtr_t &joint, const vector3_t reference, std::vector< bool > mask)
 
- Public Member Functions inherited from hpp::constraints::DifferentiableFunction
virtual ~DifferentiableFunction ()
 
void operator() (vectorOut_t result, vectorIn_t argument) const
 Evaluate the function at a given parameter. More...
 
void jacobian (matrixOut_t jacobian, vectorIn_t argument) const
 Computes the jacobian. More...
 
size_type inputSize () const
 Get dimension of input vector. More...
 
size_type inputDerivativeSize () const
 Get dimension of input derivative vector. More...
 
size_type outputSize () const
 Get dimension of output vector. More...
 
const std::string & name () const
 Get function name. More...
 
virtual std::ostream & print (std::ostream &o) const
 Display object in a stream. More...
 

Static Public Member Functions

static EIGEN_MAKE_ALIGNED_OPERATOR_NEW RelativeComPtr_t create (const DevicePtr_t &robot, const JointPtr_t &joint, const vector3_t reference, std::vector< bool > mask=boost::assign::list_of(true)(true)(true).convert_to_container< std::vector< bool > >())
 Return a shared pointer to a new instance. More...
 
static RelativeComPtr_t create (const DevicePtr_t &robot, const CenterOfMassComputationPtr_t &comc, const JointPtr_t &joint, const vector3_t reference, std::vector< bool > mask=boost::assign::list_of(true)(true)(true).convert_to_container< std::vector< bool > >())
 

Protected Member Functions

virtual void impl_compute (vectorOut_t result, ConfigurationIn_t argument) const throw ()
 Compute value of error. More...
 
virtual void impl_jacobian (matrixOut_t jacobian, ConfigurationIn_t arg) const throw ()
 
- Protected Member Functions inherited from hpp::constraints::DifferentiableFunction
 DifferentiableFunction (size_type inputSize, size_type inputDerivativeSize, size_type outputSize, std::string name=std::string())
 Concrete class constructor should call this constructor. More...
 
virtual void impl_compute (vectorOut_t result, vectorIn_t argument) const =0
 User implementation of function evaluation. More...
 
virtual void impl_jacobian (matrixOut_t jacobian, vectorIn_t arg) const =0
 

Detailed Description

Constraint on the relative position of the center of mass.

The value of the function is defined as the position of the center of mass in the reference frame of a joint.

\begin{eqnarray*} \mathbf{f}(\mathbf{q}) &=& R^T \left(\mathbf{x} - \mathbf{t}\right) - \mathbf{x}^{*}\\ \mathbf{\dot{f}} &=& R^T \left( J_{com} + [\mathbf{x}-\mathbf{t}]_{\times}J_{joint}^{\omega} - J_{joint}^{\mathbf{v}}\right)\mathbf{\dot{q}} \end{eqnarray*}

  • $ \left(\begin{array}{cc} R & \mathbf{t} \\ 0 & 1\end{array}\right) $ is the position of the joint,
  • $\mathbf{x}$ is the position of the center of mass,
  • $\mathbf{x}^{*}$ is the desired position of the center of mass expressed in joint frame.

Constructor & Destructor Documentation

◆ ~RelativeCom()

virtual hpp::constraints::RelativeCom::~RelativeCom ( )
throw (
)
inlinevirtual

◆ RelativeCom()

hpp::constraints::RelativeCom::RelativeCom ( const DevicePtr_t robot,
const CenterOfMassComputationPtr_t comc,
const JointPtr_t joint,
const vector3_t  reference,
std::vector< bool >  mask 
)

Member Function Documentation

◆ create() [1/2]

static EIGEN_MAKE_ALIGNED_OPERATOR_NEW RelativeComPtr_t hpp::constraints::RelativeCom::create ( const DevicePtr_t robot,
const JointPtr_t joint,
const vector3_t  reference,
std::vector< bool >  mask = boost::assign::list_of(true)(true)(true).convert_to_container< std::vector< bool > >() 
)
static

Return a shared pointer to a new instance.

◆ create() [2/2]

static RelativeComPtr_t hpp::constraints::RelativeCom::create ( const DevicePtr_t robot,
const CenterOfMassComputationPtr_t comc,
const JointPtr_t joint,
const vector3_t  reference,
std::vector< bool >  mask = boost::assign::list_of(true)(true)(true).convert_to_container< std::vector< bool > >() 
)
static

◆ impl_compute()

virtual void hpp::constraints::RelativeCom::impl_compute ( vectorOut_t  result,
ConfigurationIn_t  argument 
) const
throw (
)
protectedvirtual

Compute value of error.

Parameters
argumentconfiguration of the robot,
Return values
resulterror vector

◆ impl_jacobian()

virtual void hpp::constraints::RelativeCom::impl_jacobian ( matrixOut_t  jacobian,
ConfigurationIn_t  arg 
) const
throw (
)
protectedvirtual