Template Class IntegratedActionModelAbstractTpl

Inheritance Relationships

Base Type

Derived Types

Class Documentation

template<typename _Scalar>
class IntegratedActionModelAbstractTpl : public crocoddyl::ActionModelAbstractTpl<_Scalar>

Abstract class for an integrated action model.

An integrated action model is a special kind of action model that is obtained by applying a numerical integration scheme to a differential (i.e., continuous time) action model. Different integration schemes can be implemented inheriting from this base class.

The numerical integration 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.

Subclassed by crocoddyl::IntegratedActionModelEulerTpl< _Scalar >, crocoddyl::IntegratedActionModelRKTpl< _Scalar >

Public Types

typedef MathBaseTpl<Scalar> MathBase
typedef ActionModelAbstractTpl<Scalar> Base
typedef IntegratedActionDataAbstractTpl<Scalar> Data
typedef ActionDataAbstractTpl<Scalar> ActionDataAbstract
typedef DifferentialActionModelAbstractTpl<Scalar> DifferentialActionModelAbstract
typedef ControlParametrizationModelAbstractTpl<Scalar> ControlParametrizationModelAbstract
typedef MathBase::VectorXs VectorXs
typedef MathBase::MatrixXs MatrixXs

Public Functions

IntegratedActionModelAbstractTpl(std::shared_ptr<DifferentialActionModelAbstract> model, std::shared_ptr<ControlParametrizationModelAbstract> control, const Scalar time_step = Scalar(1e-3), const bool with_cost_residual = true)

Initialize the 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)

IntegratedActionModelAbstractTpl(std::shared_ptr<DifferentialActionModelAbstract> model, const Scalar time_step = Scalar(1e-3), const bool with_cost_residual = true)

Initialize the integrator.

This initialization uses ControlParametrizationPolyZeroTpl for 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 ~IntegratedActionModelAbstractTpl() = default
virtual std::shared_ptr<ActionDataAbstract> createData() override

Create the integrator data.

Returns:

the sympletic integrator data

virtual std::size_t get_ng() const override

Return the number of inequality constraints.

virtual std::size_t get_nh() const override

Return the number of equality constraints.

virtual std::size_t get_ng_T() const override

Return the number of inequality terminal constraints.

virtual std::size_t get_nh_T() const override

Return the number of equality terminal constraints.

virtual const VectorXs &get_g_lb() const override

Return the lower bound of the inequality constraints.

virtual const VectorXs &get_g_ub() const override

Return the upper bound of the inequality constraints.

const std::shared_ptr<DifferentialActionModelAbstract> &get_differential() const

Return the differential action model associated to this integrated action model.

const std::shared_ptr<ControlParametrizationModelAbstract> &get_control() const

Return the control parametrization model associated to this integrated action model.

const Scalar get_dt() const

Return the time step used for the integration.

void set_dt(const Scalar dt)

Set the time step for the integration.

DEPRECATED ("The DifferentialActionModel should be set at construction time", void set_differential(std::shared_ptr< DifferentialActionModelAbstract > model))

Public Members

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar

Protected Functions

inline IntegratedActionModelAbstractTpl()

< Upper control limits

void init()

Protected Attributes

std::shared_ptr<DifferentialActionModelAbstract> differential_

Differential action model that is integrated.

std::shared_ptr<ControlParametrizationModelAbstract> control_

Model of the control parametrization.

Scalar time_step_

Time step used for integration.

Scalar time_step2_

Square of the time step used for integration.

bool with_cost_residual_

Flag indicating whether a cost residual is used.

bool has_control_limits_

Indicates whether any of the control limits is finite

std::size_t nr_

< Indicates whether any of the control limits are active

std::size_t nu_

< Dimension of the cost residual

std::shared_ptr<StateAbstract> state_

< Dimension of the control

VectorXs u_lb_

< Model of the state

VectorXs u_ub_

< Lower control limits