Public Types | |
typedef CostModelAbstractTpl< Scalar > | Base |
typedef CostDataAbstractTpl< Scalar > | CostDataAbstract |
typedef CostDataNumDiffTpl< Scalar > | Data |
typedef DataCollectorAbstractTpl< Scalar > | DataCollectorAbstract |
typedef MathBaseTpl< Scalar > | MathBase |
typedef MathBaseTpl< Scalar >::MatrixXs | MatrixXs |
typedef boost::function< void(const typename MathBaseTpl< Scalar >::VectorXs &)> | ReevaluationFunction |
typedef MathBaseTpl< Scalar >::VectorXs | VectorXs |
Public Member Functions | |
CostModelNumDiffTpl (const boost::shared_ptr< Base > &model) | |
Construct a new CostModelNumDiff object from a CostModelAbstract. More... | |
virtual | ~CostModelNumDiffTpl () |
Default destructor of the CostModelNumDiff object. | |
virtual void | calc (const boost::shared_ptr< CostDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u) |
virtual void | calcDiff (const boost::shared_ptr< CostDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u) |
virtual boost::shared_ptr< CostDataAbstract > | createData (DataCollectorAbstract *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... | |
bool | get_with_gauss_approx () |
Identify if the Gauss approximation is going to be used or not. More... | |
void | set_disturbance (const Scalar &disturbance) |
Set the disturbance_ object. More... | |
void | set_reevals (const std::vector< ReevaluationFunction > &reevals) |
Register functions that updates the shared data computed for a system rollout The updated data is used to evaluate of the gradient and hessian. More... | |
Public Attributes | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar | Scalar |
Protected Attributes | |
boost::shared_ptr< ActivationModelAbstract > | activation_ |
Scalar | disturbance_ |
Numerical disturbance used in the numerical differentiation. | |
boost::shared_ptr< Base > | model_ |
Model of the cost. | |
std::size_t | nu_ |
std::vector< ReevaluationFunction > | reevals_ |
Functions that needs execution before calc or calcDiff. | |
boost::shared_ptr< StateMultibody > | state_ |
VectorXs | unone_ |
|
explicit |
Construct a new CostModelNumDiff object from a CostModelAbstract.
model |
|
virtual |
|
virtual |
|
virtual |
Create a Data object.
data | is the DataCollector used by the original model. |
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 |
bool get_with_gauss_approx | ( | ) |
Identify if the Gauss approximation is going to be used or not.
void set_reevals | ( | const std::vector< ReevaluationFunction > & | reevals | ) |
Register functions that updates the shared data computed for a system rollout The updated data is used to evaluate of the gradient and hessian.
reevals | are the registered functions. |