Crocoddyl
ContactModelAbstractTpl< _Scalar > Class Template Referenceabstract
Inheritance diagram for ContactModelAbstractTpl< _Scalar >:
ContactModel1DTpl< _Scalar > ContactModel2DTpl< _Scalar > ContactModel3DTpl< _Scalar > ContactModel6DTpl< _Scalar > ContactModelNumDiffTpl< _Scalar >

Public Types

typedef ContactDataAbstractTpl< Scalar > ContactDataAbstract
 
typedef MathBaseTpl< Scalar > MathBase
 
typedef MathBase::MatrixXs MatrixXs
 
typedef StateMultibodyTpl< Scalar > StateMultibody
 
typedef MathBase::VectorXs VectorXs
 

Public Member Functions

 ContactModelAbstractTpl (boost::shared_ptr< StateMultibody > state, const pinocchio::ReferenceFrame type, const std::size_t nc)
 
 ContactModelAbstractTpl (boost::shared_ptr< StateMultibody > state, const pinocchio::ReferenceFrame type, const std::size_t nc, const std::size_t nu)
 Initialize the contact abstraction. More...
 
this assumes is ContactModelAbstractTpl (boost::shared_ptr< StateMultibody > state, const std::size_t nc)
 
virtual void calc (const boost::shared_ptr< ContactDataAbstract > &data, const Eigen::Ref< const VectorXs > &x)=0
 Compute the contact Jacobian and acceleration drift. More...
 
virtual void calcDiff (const boost::shared_ptr< ContactDataAbstract > &data, const Eigen::Ref< const VectorXs > &x)=0
 Compute the derivatives of the acceleration-based contact. More...
 
virtual boost::shared_ptr< ContactDataAbstractcreateData (pinocchio::DataTpl< Scalar > *const data)
 Create the contact data.
 
 DEPRECATED ("Use constructor that passes the type type of contact, this assumes is " "pinocchio::LOCAL", ContactModelAbstractTpl(boost::shared_ptr< StateMultibody > state, const std::size_t nc, const std::size_t nu);) DEPRECATED("Use const ructor that passes the type type of contact
 
pinocchio::FrameIndex get_id () const
 Return the reference frame id.
 
std::size_t get_nc () const
 Return the dimension of the contact.
 
std::size_t get_nu () const
 Return the dimension of the control vector.
 
const boost::shared_ptr< StateMultibody > & get_state () const
 Return the state.
 
pinocchio::ReferenceFrame get_type () const
 Return the type of contact.
 
virtual void print (std::ostream &os) const
 Print relevant information of the contact model. More...
 
void set_id (const pinocchio::FrameIndex id)
 Modify the reference frame id.
 
void set_type (const pinocchio::ReferenceFrame type)
 Modify the type of contact.
 
void setZeroForce (const boost::shared_ptr< ContactDataAbstract > &data) const
 Set the stack of spatial forces to zero. More...
 
void setZeroForceDiff (const boost::shared_ptr< ContactDataAbstract > &data) const
 Set the stack of spatial forces Jacobians to zero. More...
 
virtual void updateForce (const boost::shared_ptr< ContactDataAbstract > &data, const VectorXs &force)=0
 Convert the force into a stack of spatial forces. More...
 
void updateForceDiff (const boost::shared_ptr< ContactDataAbstract > &data, const MatrixXs &df_dx, const MatrixXs &df_du) const
 Convert the force into a stack of spatial forces. More...
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
 

Protected Attributes

pinocchio::FrameIndex id_
 Reference frame id of the contact.
 
std::size_t nc_
 
std::size_t nu_
 
boost::shared_ptr< StateMultibodystate_
 
pinocchio::ReferenceFrame type_
 Type of contact.
 

Friends

template<class Scalar >
std::ostream & operator<< (std::ostream &os, const ContactModelAbstractTpl< Scalar > &model)
 Print information on the contact model.
 

Detailed Description

template<typename _Scalar>
class crocoddyl::ContactModelAbstractTpl< _Scalar >

Definition at line 24 of file contact-base.hpp.

Constructor & Destructor Documentation

◆ ContactModelAbstractTpl()

ContactModelAbstractTpl ( boost::shared_ptr< StateMultibody state,
const pinocchio::ReferenceFrame  type,
const std::size_t  nc,
const std::size_t  nu 
)

Initialize the contact abstraction.

Parameters
[in]stateState of the multibody system
[in]typeType of contact
[in]ncDimension of the contact model
[in]nuDimension of the control vector

Member Function Documentation

◆ calc()

virtual void calc ( const boost::shared_ptr< ContactDataAbstract > &  data,
const Eigen::Ref< const VectorXs > &  x 
)
pure virtual

Compute the contact Jacobian and acceleration drift.

Parameters
[in]dataContact data
[in]xState point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
[in]uControl input \(\mathbf{u}\in\mathbb{R}^{nu}\)

Implemented in ContactModelNumDiffTpl< _Scalar >, ContactModel6DTpl< _Scalar >, ContactModel3DTpl< _Scalar >, ContactModel2DTpl< _Scalar >, and ContactModel1DTpl< _Scalar >.

◆ calcDiff()

virtual void calcDiff ( const boost::shared_ptr< ContactDataAbstract > &  data,
const Eigen::Ref< const VectorXs > &  x 
)
pure virtual

Compute the derivatives of the acceleration-based contact.

Parameters
[in]dataContact data
[in]xState point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
[in]uControl input \(\mathbf{u}\in\mathbb{R}^{nu}\)

Implemented in ContactModelNumDiffTpl< _Scalar >, ContactModel6DTpl< _Scalar >, ContactModel3DTpl< _Scalar >, ContactModel2DTpl< _Scalar >, and ContactModel1DTpl< _Scalar >.

◆ updateForce()

virtual void updateForce ( const boost::shared_ptr< ContactDataAbstract > &  data,
const VectorXs &  force 
)
pure virtual

Convert the force into a stack of spatial forces.

Parameters
[in]dataContact data
[in]forceContact force

Implemented in ContactModelNumDiffTpl< _Scalar >, ContactModel6DTpl< _Scalar >, ContactModel3DTpl< _Scalar >, ContactModel2DTpl< _Scalar >, and ContactModel1DTpl< _Scalar >.

◆ updateForceDiff()

void updateForceDiff ( const boost::shared_ptr< ContactDataAbstract > &  data,
const MatrixXs &  df_dx,
const MatrixXs &  df_du 
) const

Convert the force into a stack of spatial forces.

Parameters
[in]dataContact data
[in]forceContact force

◆ setZeroForce()

void setZeroForce ( const boost::shared_ptr< ContactDataAbstract > &  data) const

Set the stack of spatial forces to zero.

Parameters
[in]dataContact data

◆ setZeroForceDiff()

void setZeroForceDiff ( const boost::shared_ptr< ContactDataAbstract > &  data) const

Set the stack of spatial forces Jacobians to zero.

Parameters
[in]dataContact data

◆ print()

virtual void print ( std::ostream &  os) const
virtual

Print relevant information of the contact model.

Parameters
[out]osOutput stream object

Reimplemented in ContactModel6DTpl< _Scalar >, ContactModel3DTpl< _Scalar >, ContactModel2DTpl< _Scalar >, and ContactModel1DTpl< _Scalar >.


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