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< ContactDataAbstract > | createData (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< StateMultibody > | state_ |
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. | |
Definition at line 24 of file contact-base.hpp.
ContactModelAbstractTpl | ( | boost::shared_ptr< StateMultibody > | state, |
const pinocchio::ReferenceFrame | type, | ||
const std::size_t | nc, | ||
const std::size_t | nu | ||
) |
Initialize the contact abstraction.
[in] | state | State of the multibody system |
[in] | type | Type of contact |
[in] | nc | Dimension of the contact model |
[in] | nu | Dimension of the control vector |
|
pure virtual |
Compute the contact Jacobian and acceleration drift.
[in] | data | Contact data |
[in] | x | State point \(\mathbf{x}\in\mathbb{R}^{ndx}\) |
[in] | u | Control input \(\mathbf{u}\in\mathbb{R}^{nu}\) |
Implemented in ContactModelNumDiffTpl< _Scalar >, ContactModel6DTpl< _Scalar >, ContactModel3DTpl< _Scalar >, ContactModel2DTpl< _Scalar >, and ContactModel1DTpl< _Scalar >.
|
pure virtual |
Compute the derivatives of the acceleration-based contact.
[in] | data | Contact data |
[in] | x | State point \(\mathbf{x}\in\mathbb{R}^{ndx}\) |
[in] | u | Control input \(\mathbf{u}\in\mathbb{R}^{nu}\) |
Implemented in ContactModelNumDiffTpl< _Scalar >, ContactModel6DTpl< _Scalar >, ContactModel3DTpl< _Scalar >, ContactModel2DTpl< _Scalar >, and ContactModel1DTpl< _Scalar >.
|
pure virtual |
Convert the force into a stack of spatial forces.
[in] | data | Contact data |
[in] | force | Contact force |
Implemented in ContactModelNumDiffTpl< _Scalar >, ContactModel6DTpl< _Scalar >, ContactModel3DTpl< _Scalar >, ContactModel2DTpl< _Scalar >, and ContactModel1DTpl< _Scalar >.
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.
[in] | data | Contact data |
[in] | force | Contact force |
void setZeroForce | ( | const boost::shared_ptr< ContactDataAbstract > & | data | ) | const |
Set the stack of spatial forces to zero.
[in] | data | Contact data |
void setZeroForceDiff | ( | const boost::shared_ptr< ContactDataAbstract > & | data | ) | const |
Set the stack of spatial forces Jacobians to zero.
[in] | data | Contact data |
|
virtual |
Print relevant information of the contact model.
[out] | os | Output stream object |
Reimplemented in ContactModel6DTpl< _Scalar >, ContactModel3DTpl< _Scalar >, ContactModel2DTpl< _Scalar >, and ContactModel1DTpl< _Scalar >.