Template Class ActuationModelNumDiffTpl
Defined in File actuation.hpp
Inheritance Relationships
Base Type
public crocoddyl::ActuationModelAbstractTpl< _Scalar >(Template Class ActuationModelAbstractTpl)
Class Documentation
-
template<typename _Scalar>
class ActuationModelNumDiffTpl : public crocoddyl::ActuationModelAbstractTpl<_Scalar> This class computes the numerical differentiation of an actuation model.
It computes the 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()Public Types
-
typedef MathBaseTpl<Scalar> MathBase
-
typedef ActuationModelAbstractTpl<Scalar> Base
-
typedef ActuationDataNumDiffTpl<Scalar> Data
-
typedef ActuationDataAbstractTpl<Scalar> ActuationDataAbstract
Public Functions
Initialize the numdiff residual model.
- Parameters:
model – Actuation model that we want to apply the numerical differentiation
-
virtual ~ActuationModelNumDiffTpl() = default
Destroy the numdiff actuation model.
Compute the actuation signal from the state point \(\mathbf{x}\in\mathbb{R}^{ndx}\) and joint torque inputs \(\mathbf{u}\in\mathbb{R}^{nu}\).
- Parameters:
data – [in] Actuation data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
u – [in] Joint-torque input \(\mathbf{u}\in\mathbb{R}^{nu}\)
Ignore the computation of the actuation signal.
It does not update the actuation signal as this function is used in the terminal nodes of an optimal control problem.
- Parameters:
data – [in] Actuation data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
Compute the Jacobians of the actuation function.
- Parameters:
data – [in] Actuation data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
u – [in] Joint-torque input \(\mathbf{u}\in\mathbb{R}^{nu}\)
Compute the joint torque input from the generalized torques.
It stores the results in
ActuationDataAbstractTpl::u.- Parameters:
data – [in] Actuation data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
tau – [in] Generalized torques \(\mathbf{u}\in\mathbb{R}^{nv}\)
Compute the torque transform from generalized torques to joint torque inputs.
It stores the results in
ActuationDataAbstractTpl::Mtau.- Parameters:
data – [in] Actuation data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
tau – [in] Joint-torque inputs \(\mathbf{u}\in\mathbb{R}^{nu}\)
-
virtual std::shared_ptr<ActuationDataAbstract> createData() override
Create the actuation data.
- Returns:
the actuation data
-
template<typename NewScalar>
ActuationModelNumDiffTpl<NewScalar> cast() const
-
const Scalar get_disturbance() const
Return the disturbance constant used by the numerical differentiation routine.
-
void set_disturbance(const Scalar disturbance)
Modify the disturbance constant used by the numerical differentiation routine.
Public Members
- EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
Protected Attributes
-
std::size_t nu_
Dimension of joint torque inputs.
-
typedef MathBaseTpl<Scalar> MathBase