Template Class IntegratedActionModelEulerTpl
Defined in File euler.hpp
Inheritance Relationships
Base Type
public crocoddyl::IntegratedActionModelAbstractTpl< _Scalar >(Template Class IntegratedActionModelAbstractTpl)
Class Documentation
-
template<typename _Scalar>
class IntegratedActionModelEulerTpl : public crocoddyl::IntegratedActionModelAbstractTpl<_Scalar> Symplectic Euler integrator.
It applies a symplectic Euler integration scheme to a differential (i.e., continuous time) action model.
This symplectic Euler scheme introduces also the possibility to parametrize the control trajectory inside an integration step, for instance using polynomials. This requires introducing some notation to clarify the difference between the control inputs of the differential model and the control inputs to the integrated model. We have decided to use \(\mathbf{w}\) to refer to the control inputs of the differential model and \(\mathbf{u}\) for the control inputs of the integrated action model. Note that the zero-order (e.g.,
ControlParametrizationModelPolyZeroTpl) are the only ones that make sense to use within this integrator.See also
Public Types
-
typedef MathBaseTpl<Scalar> MathBase
-
typedef IntegratedActionModelAbstractTpl<Scalar> Base
-
typedef IntegratedActionDataEulerTpl<Scalar> Data
-
typedef ActionDataAbstractTpl<Scalar> ActionDataAbstract
-
typedef DifferentialActionModelAbstractTpl<Scalar> DifferentialActionModelAbstract
-
typedef ControlParametrizationModelAbstractTpl<Scalar> ControlParametrizationModelAbstract
-
typedef ControlParametrizationDataAbstractTpl<Scalar> ControlParametrizationDataAbstract
Public Functions
Initialize the symplectic Euler integrator.
- Parameters:
model – [in] Differential action model
control – [in] Control parametrization
time_step – [in] Step time (default 1e-3)
with_cost_residual – [in] Compute cost residual (default true)
Initialize the symplectic Euler integrator.
This initialization uses
ControlParametrizationPolyZeroTplfor the control parametrization.- Parameters:
model – [in] Differential action model
time_step – [in] Step time (default 1e-3)
with_cost_residual – [in] Compute cost residual (default true)
-
virtual ~IntegratedActionModelEulerTpl() = default
Integrate the differential action model using symplectic Euler scheme.
- Parameters:
data – [in] Symplectic Euler data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
u – [in] Control input \(\mathbf{u}\in\mathbb{R}^{nu}\)
Integrate the total cost value for nodes that depends only on the state using symplectic Euler scheme.
It computes the total cost and defines the next state as the current one. This function is used in the terminal nodes of an optimal control problem.
- Parameters:
data – [in] Symplectic Euler data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
Compute the partial derivatives of the symplectic Euler integrator.
- Parameters:
data – [in] Symplectic Euler data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
u – [in] Control input \(\mathbf{u}\in\mathbb{R}^{nu}\)
Compute the partial derivatives of the cost.
It updates the derivatives of the cost function with respect to the state only. This function is used in the terminal nodes of an optimal control problem.
- Parameters:
data – [in] Symplectic Euler data
x – [in] State point \(\mathbf{x}\in\mathbb{R}^{ndx}\)
-
virtual std::shared_ptr<ActionDataAbstract> createData() override
Create the symplectic Euler data.
- Returns:
the symplectic Euler data
-
template<typename NewScalar>
IntegratedActionModelEulerTpl<NewScalar> cast() const Cast the Euler integrated-action model to a different scalar type.
It is useful for operations requiring different precision or scalar types.
- Template Parameters:
NewScalar – The new scalar type to cast to.
- Returns:
IntegratedActionModelEulerTpl<NewScalar> An action model with the new scalar type.
Checks that a specific data belongs to this model.
Computes the quasic static commands.
The quasic static commands are the ones produced for a the reference posture as an equilibrium point, i.e. for \(\mathbf{f^q_x}\delta\mathbf{q}+\mathbf{f_u}\delta\mathbf{u}=\mathbf{0}\)
- Parameters:
data – [in] Symplectic Euler data
u – [out] Quasic static commands
x – [in] State point (velocity has to be zero)
maxiter – [in] Maximum allowed number of iterations
tol – [in] Tolerance
-
virtual void print(std::ostream &os) const override
Print relevant information of the Euler integrator model.
- Parameters:
os – [out] Output stream object
Public Members
- EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
Protected Attributes
-
std::shared_ptr<ControlParametrizationModelAbstract> control_
Model of the control parametrization.
-
std::shared_ptr<DifferentialActionModelAbstract> differential_
< Control parametrization
-
std::size_t nu_
< Number of equality constraints
-
std::shared_ptr<StateAbstract> state_
< Dimension of the control
-
Scalar time_step2_
< Model of the state
-
Scalar time_step_
< Square of the time step used for integration
-
bool with_cost_residual_
< Time step used for integration
-
typedef MathBaseTpl<Scalar> MathBase