Template Class ContactModel2DTpl
Defined in File contact-2d.hpp
Inheritance Relationships
Base Type
public crocoddyl::ContactModelAbstractTpl< _Scalar >(Template Class ContactModelAbstractTpl)
Class Documentation
-
template<typename _Scalar>
class ContactModel2DTpl : public crocoddyl::ContactModelAbstractTpl<_Scalar> Public Types
-
typedef MathBaseTpl<Scalar> MathBase
-
typedef ContactModelAbstractTpl<Scalar> Base
-
typedef ContactData2DTpl<Scalar> Data
-
typedef StateMultibodyTpl<Scalar> StateMultibody
-
typedef ContactDataAbstractTpl<Scalar> ContactDataAbstract
Public Functions
Initialize the 2d contact model.
- Parameters:
state – [in] State of the multibody system
id – [in] Reference frame id of the contact
xref – [in] Contact position used for the Baumgarte stabilization
nu – [in] Dimension of the control vector
gains – [in] Baumgarte stabilization gains
Initialize the 2d contact model.
The default
nuis obtained fromStateAbstractTpl::get_nv().- Parameters:
state – [in] State of the multibody system
id – [in] Reference frame id of the contact
xref – [in] Contact position used for the Baumgarte stabilization
gains – [in] Baumgarte stabilization gains
-
virtual ~ContactModel2DTpl() = default
Compute the 2d contact Jacobian and drift.
- Parameters:
data – [in] 2d contact data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
u – [in] Control input \(\mathbf{u}\in\mathbb{R}^{nu}\)
Compute the derivatives of the 2d contact holonomic constraint.
- Parameters:
data – [in] 2d contact data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
u – [in] Control input \(\mathbf{u}\in\mathbb{R}^{nu}\)
Convert the force into a stack of spatial forces.
- Parameters:
data – [in] 2d contact data
force – [in] 2d force
-
virtual std::shared_ptr<ContactDataAbstract> createData(pinocchio::DataTpl<Scalar> *const data) override
Create the 2d contact data.
-
template<typename NewScalar>
ContactModel2DTpl<NewScalar> cast() const Cast the contact-2d model to a different scalar type.
It is useful for operations requiring different precision or scalar types.
- Template Parameters:
NewScalar – The new scalar type to cast to.
- Returns:
ContactModel2DTpl<NewScalar> A contact model with the new scalar type.
-
virtual void print(std::ostream &os) const override
Print relevant information of the 2d contact model.
- Parameters:
os – [out] Output stream object
Public Members
- 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_
-
std::shared_ptr<StateMultibody> state_
-
typedef MathBaseTpl<Scalar> MathBase