Class DifferentialActionModelContactInvDynamicsTpl::ResidualModelContact
Defined in File contact-invdyn.hpp
Nested Relationships
This class is a nested type of Template Class DifferentialActionModelContactInvDynamicsTpl.
Inheritance Relationships
Base Type
public crocoddyl::ResidualModelAbstractTpl< _Scalar >(Template Class ResidualModelAbstractTpl)
Class Documentation
-
class ResidualModelContact : public crocoddyl::ResidualModelAbstractTpl<_Scalar>
Contact-acceleration residual.
This residual function is defined as \(\mathbf{r} = \mathbf{a_0}\), where \(\mathbf{a_0}\) defines the desired contact acceleration, which might also include the Baumgarte stabilization gains. Furthermore, the Jacobians of the residual function are computed analytically. This is used by
ConstraintModelManagerTplinside parentDifferentialActionModelContactInvDynamicsTplclass.As described in
ResidualModelAbstractTpl, the residual value and its Jacobians are calculated bycalcandcalcDiff, respectively.See also
Public Types
-
typedef MathBaseTpl<Scalar> MathBase
-
typedef ResidualModelAbstractTpl<Scalar> Base
-
typedef StateMultibodyTpl<Scalar> StateMultibody
-
typedef ResidualDataAbstractTpl<Scalar> ResidualDataAbstract
-
typedef DataCollectorAbstractTpl<Scalar> DataCollectorAbstract
Public Functions
- EIGEN_MAKE_ALIGNED_OPERATOR_NEW CROCODDYL_INNER_DERIVED_CAST (ResidualModelBase, DifferentialActionModelContactInvDynamicsTpl, ResidualModelContact) typedef _Scalar Scalar
Initialize the contact-acceleration residual model.
- Parameters:
state – [in] State of the multibody system
id – [in] Contact frame id
nr – [in] Dimension of the contact-acceleration residual
nc – [in] Dimension of all contacts
-
virtual ~ResidualModelContact() = default
Compute the contact-acceleration residual.
- Parameters:
data – [in] Contact-acceleration residual data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
u – [in] Control input \(\mathbf{u}\in\mathbb{R}^{nv+nu}\)
Compute the derivatives of the contact-acceleration residual.
- Parameters:
data – [in] Contact-acceleration residual data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
u – [in] Control input \(\mathbf{u}\in\mathbb{R}^{nu}\)
-
inline virtual std::shared_ptr<ResidualDataAbstract> createData(DataCollectorAbstract *const data) override
Create the contact-acceleration residual data.
- Returns:
contact-acceleration residual data
-
template<typename NewScalar>
inline DifferentialActionModelContactInvDynamicsTpl<NewScalar>::ResidualModelContact cast() const Cast the contact-residual 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:
typename DifferentialActionModelContactInvDynamicsTpl<NewScalar>::ResidualModelContact A residual model with the new scalar type.
-
inline virtual void print(std::ostream &os) const override
Print relevant information of the contact-acceleration residual model.
- Parameters:
os – [out] Output stream object
Protected Attributes
-
std::size_t nr_
Residual vector dimension.
-
std::size_t nu_
Control dimension.
-
std::shared_ptr<StateAbstract> state_
State description.
-
typedef MathBaseTpl<Scalar> MathBase