crocoddyl  1.9.0
Contact RObot COntrol by Differential DYnamic programming Library (Crocoddyl)
ActuationModelNumDiffTpl< _Scalar > Class Template Reference

This class computes the numerical differentiation of an actuation model. More...

#include <crocoddyl/core/numdiff/actuation.hpp>

Public Types

typedef ActuationDataAbstractTpl< Scalar > ActuationDataAbstract
 
typedef ActuationModelAbstractTpl< Scalar > Base
 
typedef ActuationDataNumDiffTpl< Scalar > Data
 
typedef MathBaseTpl< Scalar > MathBase
 
typedef MathBase::MatrixXs MatrixXs
 
typedef _Scalar Scalar
 
typedef MathBase::VectorXs VectorXs
 

Public Member Functions

 ActuationModelNumDiffTpl (boost::shared_ptr< Base > model)
 Initialize the numdiff residual model. More...
 
virtual ~ActuationModelNumDiffTpl ()
 Destroy the numdiff actuation model.
 
virtual void calc (const boost::shared_ptr< ActuationDataAbstract > &data, const Eigen::Ref< const VectorXs > &x)
 
virtual void calc (const boost::shared_ptr< ActuationDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)
 Compute the actuation signal from the state point \(\mathbf{x}\in\mathbb{R}^{ndx}\) and control input \(\mathbf{u}\in\mathbb{R}^{nu}\). More...
 
virtual void calcDiff (const boost::shared_ptr< ActuationDataAbstract > &data, const Eigen::Ref< const VectorXs > &x)
 
virtual void calcDiff (const boost::shared_ptr< ActuationDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)
 Compute the Jacobians of the actuation function. More...
 
virtual boost::shared_ptr< ActuationDataAbstractcreateData ()
 Create the actuation data. More...
 
const Scalar get_disturbance () const
 Return the disturbance value used by the numdiff routine.
 
const boost::shared_ptr< Base > & get_model () const
 Return the original actuation model.
 
void set_disturbance (const Scalar disturbance)
 Modify the disturbance value used by the numdiff routine.
 

Protected Attributes

std::size_t nu_
 Control dimension.
 

Detailed Description

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

This class computes the numerical differentiation of an actuation model.

It computes Jacobian of the residual model via numerical differentiation, i.e., \(\frac{\partial\boldsymbol{\tau}}{\partial\mathbf{x}}\) and \(\frac{\partial\boldsymbol{\tau}}{\partial\mathbf{u}}\) which denote the Jacobians of the actuation function \(\boldsymbol{\tau}(\mathbf{x},\mathbf{u})\).

See also
ActuationModelAbstractTpl(), calcDiff()

Definition at line 243 of file fwd.hpp.

Constructor & Destructor Documentation

◆ ActuationModelNumDiffTpl()

ActuationModelNumDiffTpl ( boost::shared_ptr< Base model)
explicit

Initialize the numdiff residual model.

Parameters
modelActuation model that we want to apply the numerical differentiation

Member Function Documentation

◆ calc() [1/2]

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

Compute the actuation signal from the state point \(\mathbf{x}\in\mathbb{R}^{ndx}\) and control input \(\mathbf{u}\in\mathbb{R}^{nu}\).

Parameters
[in]dataActuation data
[in]xState point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
[in]uControl input \(\mathbf{u}\in\mathbb{R}^{nu}\)

◆ calc() [2/2]

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

It does not update the actuation signal as this function is used in the terminal nodes of an optimal control problem.

Parameters
[in]dataActuation data
[in]xState point \(\mathbf{x}\in\mathbb{R}^{ndx}\)

◆ calcDiff() [1/2]

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

Compute the Jacobians of the actuation function.

Parameters
[in]dataActuation data
[in]xState point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
[in]uControl input \(\mathbf{u}\in\mathbb{R}^{nu}\)

◆ calcDiff() [2/2]

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

◆ createData()

virtual boost::shared_ptr<ActuationDataAbstract> createData ( )
virtual

Create the actuation data.

Returns
the actuation data

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