Public Types | |
typedef ContactModelAbstractTpl< Scalar > | Base |
typedef ContactDataAbstractTpl< Scalar > | ContactDataAbstract |
typedef ContactDataNumDiffTpl< Scalar > | Data |
typedef MathBaseTpl< Scalar > | MathBase |
typedef boost::function< void(const VectorXs &, const VectorXs &)> | ReevaluationFunction |
typedef MathBaseTpl< Scalar >::VectorXs | VectorXs |
Public Member Functions | |
ContactModelNumDiffTpl (const boost::shared_ptr< Base > &model) | |
Construct a new ContactModelNumDiff object from a ContactModelAbstract. More... | |
virtual | ~ContactModelNumDiffTpl () |
Default destructor of the ContactModelNumDiff object. | |
void | calc (const boost::shared_ptr< ContactDataAbstract > &data, const Eigen::Ref< const VectorXs > &x) |
void | calcDiff (const boost::shared_ptr< ContactDataAbstract > &data, const Eigen::Ref< const VectorXs > &x) |
boost::shared_ptr< ContactDataAbstract > | createData (pinocchio::DataTpl< Scalar > *const data) |
Create a Data object. More... | |
const Scalar | get_disturbance () const |
Get the disturbance_ object. More... | |
const boost::shared_ptr< Base > & | get_model () const |
Get the model_ object. More... | |
void | set_disturbance (const Scalar disturbance) |
Set the disturbance_ object. More... | |
void | set_reevals (const std::vector< ReevaluationFunction > &reevals) |
Register functions that take a pinocchio model, a pinocchio data, a state and a control. The updated data is used to evaluate of the gradient and hessian. More... | |
void | updateForce (const boost::shared_ptr< ContactDataAbstract > &data, const VectorXs &force) |
Public Attributes | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar | Scalar |
Protected Attributes | |
Scalar | disturbance_ |
Numerical disturbance used in the numerical differentiation. | |
boost::shared_ptr< Base > | model_ |
Model of the Contact. | |
std::size_t | nc_ |
std::size_t | nu_ |
std::vector< ReevaluationFunction > | reevals_ |
Functions that needs execution before calc or calcDiff. | |
boost::shared_ptr< StateMultibody > | state_ |
|
explicit |
Construct a new ContactModelNumDiff object from a ContactModelAbstract.
model |
void calc | ( | const boost::shared_ptr< ContactDataAbstract > & | data, |
const Eigen::Ref< const VectorXs > & | x | ||
) |
void calcDiff | ( | const boost::shared_ptr< ContactDataAbstract > & | data, |
const Eigen::Ref< const VectorXs > & | x | ||
) |
void updateForce | ( | const boost::shared_ptr< ContactDataAbstract > & | data, |
const VectorXs & | force | ||
) |
boost::shared_ptr<ContactDataAbstract> createData | ( | pinocchio::DataTpl< Scalar > *const | data | ) |
Create a Data object.
data | is the Pinocchio data |
const boost::shared_ptr<Base>& get_model | ( | ) | const |
Get the model_ object.
const Scalar get_disturbance | ( | ) | const |
Get the disturbance_ object.
void set_disturbance | ( | const Scalar | disturbance | ) |
Set the disturbance_ object.
disturbance | is the value used to find the numerical derivative |
void set_reevals | ( | const std::vector< ReevaluationFunction > & | reevals | ) |
Register functions that take a pinocchio model, a pinocchio data, a state and a control. The updated data is used to evaluate of the gradient and hessian.
reevals | are the registered functions. |