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>
41 class IntegratedActionModelAbstractTpl
42 :
public ActionModelAbstractTpl<_Scalar> {
44 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
46 typedef _Scalar Scalar;
47 typedef MathBaseTpl<Scalar> MathBase;
48 typedef ActionModelAbstractTpl<Scalar> Base;
49 typedef IntegratedActionDataAbstractTpl<Scalar> Data;
50 typedef ActionDataAbstractTpl<Scalar> ActionDataAbstract;
51 typedef DifferentialActionModelAbstractTpl<Scalar>
52 DifferentialActionModelAbstract;
53 typedef ControlParametrizationModelAbstractTpl<Scalar>
54 ControlParametrizationModelAbstract;
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();
98 virtual std::size_t
get_ng()
const;
103 virtual std::size_t
get_nh()
const;
108 virtual const VectorXs&
get_g_lb()
const;
113 virtual const VectorXs&
get_g_ub()
const;
119 const boost::shared_ptr<DifferentialActionModelAbstract>&
get_differential()
126 const boost::shared_ptr<ControlParametrizationModelAbstract>&
get_control()
132 const Scalar
get_dt()
const;
137 void set_dt(
const Scalar dt);
139 DEPRECATED(
"The DifferentialActionModel should be set at construction time",
140 void set_differential(
141 boost::shared_ptr<DifferentialActionModelAbstract> model));
155 boost::shared_ptr<DifferentialActionModelAbstract>
157 boost::shared_ptr<ControlParametrizationModelAbstract>
166 template <
typename _Scalar>
168 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
170 typedef _Scalar Scalar;
173 typedef typename MathBase::VectorXs VectorXs;
174 typedef typename MathBase::MatrixXs MatrixXs;
176 template <
template <
typename Scalar>
class Model>
179 virtual ~IntegratedActionDataAbstractTpl() {}
198 #include "crocoddyl/core/integ-action-base.hxx"
200 #endif // CROCODDYL_CORE_INTEGRATED_ACTION_BASE_HPP_