Template Class ContactModel1DTpl
Defined in File contact-1d.hpp
Inheritance Relationships
Base Type
public crocoddyl::ContactModelAbstractTpl< _Scalar >(Template Class ContactModelAbstractTpl)
Class Documentation
-
template<typename _Scalar>
class ContactModel1DTpl : public crocoddyl::ContactModelAbstractTpl<_Scalar> Public Types
-
typedef MathBaseTpl<Scalar> MathBase
-
typedef ContactModelAbstractTpl<Scalar> Base
-
typedef ContactData1DTpl<Scalar> Data
-
typedef StateMultibodyTpl<Scalar> StateMultibody
-
typedef ContactDataAbstractTpl<Scalar> ContactDataAbstract
Public Functions
Initialize the 1d contact model.
To learn more about the computation of the contact derivatives in different frames see S. Kleff et. al, On the Derivation of the Contact Dynamics in Arbitrary Frames: Application to Polishing with Talos, ICHR 2022
- 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
type – [in] Type of contact
rotation – [in] Rotation of the reference frame’s z-axis
nu – [in] Dimension of the control vector
gains – [in] Baumgarte stabilization gains
Initialize the 1d contact model.
The default
nuis obtained fromStateAbstractTpl::get_nv(). To learn more about the computation of the contact derivatives in different frames see S. Kleff et. al, On the Derivation of the Contact Dynamics in Arbitrary Frames: Application to Polishing with Talos, ICHR 2022- 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
type – [in] Type of contact
gains – [in] Baumgarte stabilization gains
- DEPRECATED ("Use constructor that passes the type type of contact, this assumes is " "pinocchio::LOCAL", ContactModel1DTpl(std::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex id, const Scalar xref, const std::size_t nu, const Vector2s &gains=Vector2s::Zero());) DEPRECATED("Use const ructor that passes the type type of contact
- this assumes is ContactModel1DTpl (std::shared_ptr< StateMultibody > state, const pinocchio::FrameIndex id, const Scalar xref, const Vector2s &gains=Vector2s::Zero())
-
virtual ~ContactModel1DTpl() = default
Compute the 1d contact Jacobian and drift.
- Parameters:
data – [in] 1d 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 1d contact holonomic constraint.
- Parameters:
data – [in] 1d 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] 1d contact data
force – [in] 1d force
-
virtual std::shared_ptr<ContactDataAbstract> createData(pinocchio::DataTpl<Scalar> *const data) override
Create the 1d contact data.
-
template<typename NewScalar>
ContactModel1DTpl<NewScalar> cast() const Cast the contact-1d 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:
ContactModel1DTpl<NewScalar> A contact model with the new scalar type.
-
const Scalar get_reference() const
Return the reference frame translation.
-
void set_reference(const Scalar reference)
Modify the reference frame translation.
-
void set_axis_rotation(const Matrix3s &rotation)
Modify the rotation of the reference frames’s z axis.
-
virtual void print(std::ostream &os) const override
Print relevant information of the 1d contact model.
- Parameters:
os – [out] Output stream object
Public Members
- EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
-
typedef MathBaseTpl<Scalar> MathBase