11 #ifndef CROCODDYL_CORE_INTEGRATED_ACTION_BASE_HPP_
12 #define CROCODDYL_CORE_INTEGRATED_ACTION_BASE_HPP_
14 #include "crocoddyl/core/action-base.hpp"
15 #include "crocoddyl/core/control-base.hpp"
16 #include "crocoddyl/core/diff-action-base.hpp"
17 #include "crocoddyl/core/fwd.hpp"
18 #include "crocoddyl/core/utils/deprecate.hpp"
40 template <
typename _Scalar>
44 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
46 typedef _Scalar Scalar;
55 typedef typename MathBase::VectorXs VectorXs;
56 typedef typename MathBase::MatrixXs MatrixXs;
67 boost::shared_ptr<DifferentialActionModelAbstract> model,
68 boost::shared_ptr<ControlParametrizationModelAbstract> control,
69 const Scalar time_step = Scalar(1e-3),
70 const bool with_cost_residual =
true);
83 boost::shared_ptr<DifferentialActionModelAbstract> model,
84 const Scalar time_step = Scalar(1e-3),
85 const bool with_cost_residual =
true);
93 virtual boost::shared_ptr<ActionDataAbstract>
createData();
126 const boost::shared_ptr<ControlParametrizationModelAbstract>&
get_control()
139 DEPRECATED(
"The DifferentialActionModel should be set at construction time",
140 void set_differential(
141 boost::shared_ptr<DifferentialActionModelAbstract> model));
154 boost::shared_ptr<DifferentialActionModelAbstract>
156 boost::shared_ptr<ControlParametrizationModelAbstract>
165 template <
typename _Scalar>
167 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
169 typedef _Scalar Scalar;
172 typedef typename MathBase::VectorXs VectorXs;
173 typedef typename MathBase::MatrixXs MatrixXs;
175 template <
template <
typename Scalar>
class Model>
197 #include "crocoddyl/core/integ-action-base.hxx"
Abstract class for action model.
VectorXs u_lb_
Lower control limits.
VectorXs u_ub_
Upper control limits.
boost::shared_ptr< StateAbstract > state_
Model of the state.
std::size_t nu_
Control dimension.
std::size_t nr_
Dimension of the cost residual.
Abstract class for the control trajectory parametrization.
Abstract class for differential action model.
Abstract class for an integrated action model.
void init()
< Upper control limits
const Scalar get_dt() const
Return the time step used for the integration.
bool with_cost_residual_
Flag indicating whether a cost residual is used.
const boost::shared_ptr< ControlParametrizationModelAbstract > & get_control() const
Return the control parametrization model associated to this integrated action model.
virtual std::size_t get_ng() const
Return the number of inequality constraints.
Scalar time_step_
Time step used for integration.
virtual std::size_t get_nh() const
Return the number of equality constraints.
void set_dt(const Scalar dt)
Set the time step for the integration.
virtual const VectorXs & get_g_lb() const
Return the lower bound of the inequality constraints.
boost::shared_ptr< DifferentialActionModelAbstract > differential_
Differential action model that is integrated.
boost::shared_ptr< ControlParametrizationModelAbstract > control_
Model of the control parametrization.
IntegratedActionModelAbstractTpl(boost::shared_ptr< DifferentialActionModelAbstract > model, boost::shared_ptr< ControlParametrizationModelAbstract > control, const Scalar time_step=Scalar(1e-3), const bool with_cost_residual=true)
Initialize the integrator.
Scalar time_step2_
Square of the time step used for integration.
virtual const VectorXs & get_g_ub() const
Return the upper bound of the inequality constraints.
IntegratedActionModelAbstractTpl(boost::shared_ptr< DifferentialActionModelAbstract > model, const Scalar time_step=Scalar(1e-3), const bool with_cost_residual=true)
Initialize the integrator.
const boost::shared_ptr< DifferentialActionModelAbstract > & get_differential() const
Return the differential action model associated to this integrated action model.
virtual boost::shared_ptr< ActionDataAbstract > createData()
Create the integrator data.
VectorXs xnext
evolution state
MatrixXs Fx
Jacobian of the dynamics w.r.t. the state .
MatrixXs Fu
Jacobian of the dynamics w.r.t. the control .
MatrixXs Luu
Hessian of the cost w.r.t. the control .
VectorXs Lx
Jacobian of the cost w.r.t. the state .
MatrixXs Lxx
Hessian of the cost w.r.t. the state .
VectorXs Lu
Jacobian of the cost w.r.t. the control .