9 #ifndef CROCODDYL_CORE_COSTS_RESIDUAL_COST_HPP_
10 #define CROCODDYL_CORE_COSTS_RESIDUAL_COST_HPP_
12 #include "crocoddyl/core/fwd.hpp"
13 #include "crocoddyl/core/cost-base.hpp"
14 #include "crocoddyl/core/residual-base.hpp"
35 template <
typename _Scalar>
38 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
40 typedef _Scalar Scalar;
47 typedef typename MathBase::VectorXs VectorXs;
48 typedef typename MathBase::MatrixXs MatrixXs;
58 boost::shared_ptr<ActivationModelAbstract> activation,
59 boost::shared_ptr<ResidualModelAbstract> residual);
69 boost::shared_ptr<ResidualModelAbstract> residual);
79 virtual void calc(
const boost::shared_ptr<CostDataAbstract>& data,
const Eigen::Ref<const VectorXs>& x,
80 const Eigen::Ref<const VectorXs>& u);
89 virtual void calcDiff(
const boost::shared_ptr<CostDataAbstract>& data,
const Eigen::Ref<const VectorXs>& x,
90 const Eigen::Ref<const VectorXs>& u);
102 virtual void print(std::ostream& os)
const;
112 template <
typename _Scalar>
114 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
116 typedef _Scalar Scalar;
120 typedef typename MathBase::MatrixXs MatrixXs;
122 template <
template <
typename Scalar>
class Model>
125 Arr_Rx(model->get_residual()->get_nr(), model->get_state()->get_ndx()),
126 Arr_Ru(model->get_residual()->get_nr(), model->get_nu()) {
133 using Base::activation;
140 using Base::residual;
149 #include "crocoddyl/core/costs/residual.hxx"
151 #endif // CROCODDYL_CORE_COSTS_RESIDUAL_COST_HPP_