hpp-constraints  4.9.1
Definition of basic geometric constraints for motion planning
hpp::constraints::RelativeCom Class Reference

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

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

Public Member Functions

virtual ~RelativeCom ()
 
 RelativeCom (const DevicePtr_t &robot, const CenterOfMassComputationPtr_t &comc, const JointPtr_t &joint, const vector3_t reference, std::vector< bool > mask, const std::string &name)
 
virtual std::ostream & print (std::ostream &o) const
 Display object in a stream. More...
 
- Public Member Functions inherited from hpp::constraints::DifferentiableFunction
virtual ~DifferentiableFunction ()
 
LiegroupElement operator() (vectorIn_t argument) const
 
void value (LiegroupElementRef result, vectorIn_t argument) const
 
void jacobian (matrixOut_t jacobian, vectorIn_t argument) const
 
const ArrayXbactiveParameters () const
 
const ArrayXbactiveDerivativeParameters () const
 
size_type inputSize () const
 Get dimension of input vector. More...
 
size_type inputDerivativeSize () const
 
LiegroupSpacePtr_t outputSpace () const
 Get output space. More...
 
size_type outputSize () const
 Get dimension of output vector. More...
 
size_type outputDerivativeSize () const
 Get dimension of output derivative vector. More...
 
const std::string & name () const
 Get function name. More...
 
std::string context () const
 
void context (const std::string &c)
 
void finiteDifferenceForward (matrixOut_t jacobian, vectorIn_t arg, DevicePtr_t robot=DevicePtr_t(), value_type eps=std::sqrt(Eigen::NumTraits< value_type >::epsilon())) const
 
void finiteDifferenceCentral (matrixOut_t jacobian, vectorIn_t arg, DevicePtr_t robot=DevicePtr_t(), value_type eps=std::sqrt(Eigen::NumTraits< value_type >::epsilon())) const
 

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=std::vector< bool >(3, true))
 Return a shared pointer to a new instance. More...
 
static RelativeComPtr_t create (const std::string &name, const DevicePtr_t &robot, const JointPtr_t &joint, const vector3_t reference, std::vector< bool > mask=std::vector< bool >(3, true))
 
static RelativeComPtr_t create (const DevicePtr_t &robot, const CenterOfMassComputationPtr_t &comc, const JointPtr_t &joint, const vector3_t reference, std::vector< bool > mask=std::vector< bool >(3, true))
 
static RelativeComPtr_t create (const std::string &name, const DevicePtr_t &robot, const CenterOfMassComputationPtr_t &comc, const JointPtr_t &joint, const vector3_t reference, std::vector< bool > mask=std::vector< bool >(3, true))
 

Protected Member Functions

virtual void impl_compute (LiegroupElementRef result, ConfigurationIn_t argument) const
 
virtual void impl_jacobian (matrixOut_t jacobian, ConfigurationIn_t arg) const
 
- Protected Member Functions inherited from hpp::constraints::DifferentiableFunction
 DifferentiableFunction (size_type sizeInput, size_type sizeInputDerivative, size_type sizeOutput, std::string name=std::string())
 Concrete class constructor should call this constructor. More...
 
 DifferentiableFunction (size_type sizeInput, size_type sizeInputDerivative, const LiegroupSpacePtr_t &outputSpace, std::string name=std::string())
 Concrete class constructor should call this constructor. More...
 
virtual void impl_compute (LiegroupElementRef result, vectorIn_t argument) const =0
 User implementation of function evaluation. More...
 
virtual void impl_jacobian (matrixOut_t jacobian, vectorIn_t arg) const =0
 

Additional Inherited Members

- Protected Attributes inherited from hpp::constraints::DifferentiableFunction
size_type inputSize_
 Dimension of input vector. More...
 
size_type inputDerivativeSize_
 Dimension of input derivative. More...
 
LiegroupSpacePtr_t outputSpace_
 Dimension of output vector. More...
 
ArrayXb activeParameters_
 
ArrayXb activeDerivativeParameters_
 

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*}

where

  • \( \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 ( )
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,
const std::string &  name 
)

Member Function Documentation

◆ create() [1/4]

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 = std::vector<bool>(3, true) 
)
inlinestatic

Return a shared pointer to a new instance.

◆ create() [2/4]

static RelativeComPtr_t hpp::constraints::RelativeCom::create ( const std::string &  name,
const DevicePtr_t robot,
const JointPtr_t joint,
const vector3_t  reference,
std::vector< bool >  mask = std::vector< bool >(3, true) 
)
static

◆ create() [3/4]

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 = std::vector< bool >(3, true) 
)
static

◆ create() [4/4]

static RelativeComPtr_t hpp::constraints::RelativeCom::create ( const std::string &  name,
const DevicePtr_t robot,
const CenterOfMassComputationPtr_t comc,
const JointPtr_t joint,
const vector3_t  reference,
std::vector< bool >  mask = std::vector< bool >(3, true) 
)
static

◆ impl_compute()

virtual void hpp::constraints::RelativeCom::impl_compute ( LiegroupElementRef  result,
ConfigurationIn_t  argument 
) const
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
protectedvirtual

◆ print()

virtual std::ostream& hpp::constraints::RelativeCom::print ( std::ostream &  o) const
virtual

Display object in a stream.

Reimplemented from hpp::constraints::DifferentiableFunction.


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