crocoddyl  1.5.0
Contact RObot COntrol by Differential DYnamic programming Library (Crocoddyl)
CostModelNumDiffTpl< _Scalar > Class Template Reference
Inheritance diagram for CostModelNumDiffTpl< _Scalar >:
Collaboration diagram for CostModelNumDiffTpl< _Scalar >:

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 Types inherited from CostModelAbstractTpl< _Scalar >
typedef ActivationModelAbstractTpl< Scalar > ActivationModelAbstract
 
typedef ActivationModelQuadTpl< Scalar > ActivationModelQuad
 
typedef CostDataAbstractTpl< Scalar > CostDataAbstract
 
typedef DataCollectorAbstractTpl< Scalar > DataCollectorAbstract
 
typedef MathBaseTpl< Scalar > MathBase
 
typedef MathBase::MatrixXs MatrixXs
 
typedef StateMultibodyTpl< Scalar > StateMultibody
 
typedef MathBase::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< CostDataAbstractcreateData (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 Member Functions inherited from CostModelAbstractTpl< _Scalar >
 CostModelAbstractTpl (boost::shared_ptr< StateMultibody > state, boost::shared_ptr< ActivationModelAbstract > activation, const std::size_t &nu)
 
 CostModelAbstractTpl (boost::shared_ptr< StateMultibody > state, boost::shared_ptr< ActivationModelAbstract > activation)
 
 CostModelAbstractTpl (boost::shared_ptr< StateMultibody > state, const std::size_t &nr, const std::size_t &nu)
 
 CostModelAbstractTpl (boost::shared_ptr< StateMultibody > state, const std::size_t &nr)
 
virtual void calc (const boost::shared_ptr< CostDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)=0
 
void calc (const boost::shared_ptr< CostDataAbstract > &data, const Eigen::Ref< const VectorXs > &x)
 
virtual void calcDiff (const boost::shared_ptr< CostDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)=0
 
void calcDiff (const boost::shared_ptr< CostDataAbstract > &data, const Eigen::Ref< const VectorXs > &x)
 
const boost::shared_ptr< ActivationModelAbstract > & get_activation () const
 
const std::size_t & get_nu () const
 
template<class ReferenceType >
ReferenceType get_reference () const
 
const boost::shared_ptr< StateMultibody > & get_state () const
 
template<class ReferenceType >
void set_reference (ReferenceType ref)
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
 
- Public Attributes inherited from CostModelAbstractTpl< _Scalar >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
 

Protected Attributes

Scalar disturbance_
 Numerical disturbance used in the numerical differentiation.
 
boost::shared_ptr< Basemodel_
 Model of the cost.
 
std::vector< ReevaluationFunction > reevals_
 Functions that needs execution before calc or calcDiff.
 
- Protected Attributes inherited from CostModelAbstractTpl< _Scalar >
boost::shared_ptr< ActivationModelAbstractactivation_
 
std::size_t nu_
 
boost::shared_ptr< StateMultibodystate_
 
VectorXs unone_
 

Additional Inherited Members

- Protected Member Functions inherited from CostModelAbstractTpl< _Scalar >
virtual void get_referenceImpl (const std::type_info &, void *) const
 
virtual void set_referenceImpl (const std::type_info &, const void *)
 

Detailed Description

template<typename _Scalar>
class crocoddyl::CostModelNumDiffTpl< _Scalar >

Definition at line 49 of file fwd.hpp.

Constructor & Destructor Documentation

◆ CostModelNumDiffTpl()

CostModelNumDiffTpl ( const boost::shared_ptr< Base > &  model)
explicit

Construct a new CostModelNumDiff object from a CostModelAbstract.

Parameters
model

Member Function Documentation

◆ calc()

virtual void calc ( const boost::shared_ptr< CostDataAbstract > &  data,
const Eigen::Ref< const VectorXs > &  x,
const Eigen::Ref< const VectorXs > &  u 
)
virtual

◆ calcDiff()

virtual void calcDiff ( const boost::shared_ptr< CostDataAbstract > &  data,
const Eigen::Ref< const VectorXs > &  x,
const Eigen::Ref< const VectorXs > &  u 
)
virtual

◆ createData()

virtual boost::shared_ptr<CostDataAbstract> createData ( DataCollectorAbstract *const  data)
virtual

Create a Data object.

Parameters
datais the DataCollector used by the original model.
Returns
boost::shared_ptr<CostModelAbstract>

Reimplemented from CostModelAbstractTpl< _Scalar >.

◆ get_model()

const boost::shared_ptr<Base>& get_model ( ) const

Get the model_ object.

Returns
CostModelAbstract&

◆ get_disturbance()

const Scalar& get_disturbance ( ) const

Get the disturbance_ object.

Returns
const Scalar&

◆ set_disturbance()

void set_disturbance ( const Scalar &  disturbance)

Set the disturbance_ object.

Parameters
disturbanceis the value used to find the numerical derivative

◆ get_with_gauss_approx()

bool get_with_gauss_approx ( )

Identify if the Gauss approximation is going to be used or not.

Returns
true
false

◆ set_reevals()

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.

Parameters
reevalsare the registered functions.

The documentation for this class was generated from the following files: