9 #ifndef CROCODDYL_CORE_ACTIONS_DIFF_LQR_HPP_ 10 #define CROCODDYL_CORE_ACTIONS_DIFF_LQR_HPP_ 14 #include "crocoddyl/core/fwd.hpp" 15 #include "crocoddyl/core/diff-action-base.hpp" 16 #include "crocoddyl/core/states/euclidean.hpp" 20 template <
typename _Scalar>
23 typedef _Scalar Scalar;
29 typedef typename MathBase::VectorXs VectorXs;
30 typedef typename MathBase::MatrixXs MatrixXs;
35 virtual void calc(
const boost::shared_ptr<DifferentialActionDataAbstract>& data,
const Eigen::Ref<const VectorXs>& x,
36 const Eigen::Ref<const VectorXs>& u);
37 virtual void calcDiff(
const boost::shared_ptr<DifferentialActionDataAbstract>& data,
38 const Eigen::Ref<const VectorXs>& x,
const Eigen::Ref<const VectorXs>& u);
39 virtual boost::shared_ptr<DifferentialActionDataAbstract> createData();
41 const MatrixXs& get_Fq()
const;
42 const MatrixXs& get_Fv()
const;
43 const MatrixXs& get_Fu()
const;
44 const VectorXs& get_f0()
const;
45 const VectorXs& get_lx()
const;
46 const VectorXs& get_lu()
const;
47 const MatrixXs& get_Lxx()
const;
48 const MatrixXs& get_Lxu()
const;
49 const MatrixXs& get_Luu()
const;
51 void set_Fq(
const MatrixXs& Fq);
52 void set_Fv(
const MatrixXs& Fv);
53 void set_Fu(
const MatrixXs& Fu);
54 void set_f0(
const VectorXs& f0);
55 void set_lx(
const VectorXs& lx);
56 void set_lu(
const VectorXs& lu);
57 void set_Lxx(
const MatrixXs& Lxx);
58 void set_Lxu(
const MatrixXs& Lxu);
59 void set_Luu(
const MatrixXs& Luu);
83 template <
typename _Scalar>
85 typedef _Scalar Scalar;
88 typedef typename MathBase::VectorXs VectorXs;
89 typedef typename MathBase::MatrixXs MatrixXs;
91 template <
template <
typename Scalar>
class Model>
94 Fx.leftCols(model->get_state()->get_nq()) = model->get_Fq();
95 Fx.rightCols(model->get_state()->get_nv()) = model->get_Fv();
97 Lxx = model->get_Lxx();
98 Luu = model->get_Luu();
99 Lxu = model->get_Lxu();
119 #include "crocoddyl/core/actions/diff-lqr.hxx" 120 #endif // CROCODDYL_CORE_ACTIONS_DIFF_LQR_HPP_ VectorXs u_lb_
Lower control limits.
This class DifferentialActionModelAbstract represents a first-order ODE, i.e. where and represents ...
VectorXs unone_
Neutral state.
std::size_t nr_
Dimension of the cost residual.
std::size_t nu_
Control dimension.
bool has_control_limits_
Indicates whether any of the control limits is finite.
boost::shared_ptr< StateAbstract > state_
Model of the state.
VectorXs u_ub_
Upper control limits.