hpp::constraints::ComBetweenFeet Class Reference

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

#include <hpp/constraints/com-between-feet.hh>

Inheritance diagram for hpp::constraints::ComBetweenFeet:
[legend]
Collaboration diagram for hpp::constraints::ComBetweenFeet:
[legend]

Public Member Functions

virtual ~ComBetweenFeet () throw ()
 
 ComBetweenFeet (const std::string &name, const DevicePtr_t &robot, const CenterOfMassComputationPtr_t &comc, const JointPtr_t &jointLeft, const JointPtr_t &jointRight, const vector3_t pointLeft, const vector3_t pointRight, const JointPtr_t &jointReference, const vector3_t pointRef, std::vector< bool > mask)
 
- Public Member Functions inherited from hpp::constraints::DifferentiableFunction
virtual ~DifferentiableFunction ()
 
LiegroupElement operator() (vectorIn_t argument) const
 Evaluate the function at a given parameter. More...
 
void value (LiegroupElementRef 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...
 
const ArrayXbactiveParameters () const
 Returns a vector of booleans that indicates whether the corresponding configuration parameter influences this constraints. More...
 
const ArrayXbactiveDerivativeParameters () const
 Returns a vector of booleans that indicates whether the corresponding velocity parameter influences this constraints. More...
 
size_type inputSize () const
 Get dimension of input vector. More...
 
size_type inputDerivativeSize () const
 Get dimension of input derivative vector. More...
 
LiegroupSpacePtr_t outputSpace () const
 Get output element. 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...
 
virtual std::ostream & print (std::ostream &o) const
 Display object in a stream. 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
 Approximate the jacobian using forward finite difference. More...
 
void finiteDifferenceCentral (matrixOut_t jacobian, vectorIn_t arg, DevicePtr_t robot=DevicePtr_t(), value_type eps=std::sqrt(Eigen::NumTraits< value_type >::epsilon())) const
 Approximate the jacobian using forward finite difference. More...
 

Static Public Member Functions

static EIGEN_MAKE_ALIGNED_OPERATOR_NEW ComBetweenFeetPtr_t create (const std::string &name, const DevicePtr_t &robot, const JointPtr_t &jointLeft, const JointPtr_t &jointRight, const vector3_t pointLeft, const vector3_t pointRight, const JointPtr_t &jointReference, const vector3_t pointRef, std::vector< bool > mask=boost::assign::list_of(true)(true)(true)(true))
 Return a shared pointer to a new instance. More...
 
static ComBetweenFeetPtr_t create (const std::string &name, const DevicePtr_t &robot, const CenterOfMassComputationPtr_t &comc, const JointPtr_t &jointLeft, const JointPtr_t &jointRight, const vector3_t pointLeft, const vector3_t pointRight, const JointPtr_t &jointReference, const vector3_t pointRef, std::vector< bool > mask=boost::assign::list_of(true)(true)(true)(true))
 Return a shared pointer to a new instance. More...
 

Protected Member Functions

virtual void impl_compute (LiegroupElementRef 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 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_
 Initialized to true by this class. More...
 
ArrayXb activeDerivativeParameters_
 Initialized to true by this class. More...
 

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}) &=& \left(\begin{array}{c} ( x_{com} - x_{ref} ) \cdot u_z \\ ( R^T (e \wedge u) ) \cdot u_z \\ ( x_{com} - x_L ) \cdot (u)\\ ( x_{com} - x_R ) \cdot (u)\\ \end{array}\right) \end{eqnarray*}

where

  • \(\mathbf{x}_{com}\) is the position of the center of mass,
  • \(\mathbf{x_L}\) is the position of the left joint,
  • \(\mathbf{x_R}\) is the position of the right joint,
  • \(\mathbf{x}_{ref}\) is the desired position of the center of mass expressed in reference joint frame.
  • \( u = x_R - x_L \)
  • \( e = x_{com} - (\frac{x_L + x_R}{2})\)

Constructor & Destructor Documentation

virtual hpp::constraints::ComBetweenFeet::~ComBetweenFeet ( )
throw (
)
inlinevirtual
hpp::constraints::ComBetweenFeet::ComBetweenFeet ( const std::string &  name,
const DevicePtr_t robot,
const CenterOfMassComputationPtr_t comc,
const JointPtr_t jointLeft,
const JointPtr_t jointRight,
const vector3_t  pointLeft,
const vector3_t  pointRight,
const JointPtr_t jointReference,
const vector3_t  pointRef,
std::vector< bool >  mask 
)

Member Function Documentation

static EIGEN_MAKE_ALIGNED_OPERATOR_NEW ComBetweenFeetPtr_t hpp::constraints::ComBetweenFeet::create ( const std::string &  name,
const DevicePtr_t robot,
const JointPtr_t jointLeft,
const JointPtr_t jointRight,
const vector3_t  pointLeft,
const vector3_t  pointRight,
const JointPtr_t jointReference,
const vector3_t  pointRef,
std::vector< bool >  mask = boost::assign::list_of(true)(true)(true)(true) 
)
static

Return a shared pointer to a new instance.

static ComBetweenFeetPtr_t hpp::constraints::ComBetweenFeet::create ( const std::string &  name,
const DevicePtr_t robot,
const CenterOfMassComputationPtr_t comc,
const JointPtr_t jointLeft,
const JointPtr_t jointRight,
const vector3_t  pointLeft,
const vector3_t  pointRight,
const JointPtr_t jointReference,
const vector3_t  pointRef,
std::vector< bool >  mask = boost::assign::list_of(true)(true)(true)(true) 
)
static

Return a shared pointer to a new instance.

virtual void hpp::constraints::ComBetweenFeet::impl_compute ( LiegroupElementRef  result,
ConfigurationIn_t  argument 
) const
throw (
)
protectedvirtual

Compute value of error.

Parameters
argumentconfiguration of the robot,
Return values
resulterror vector
virtual void hpp::constraints::ComBetweenFeet::impl_jacobian ( matrixOut_t  jacobian,
ConfigurationIn_t  arg 
) const
throw (
)
protectedvirtual