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;
48 typedef typename MathBase::VectorXs VectorXs;
49 typedef typename MathBase::MatrixXs MatrixXs;
59 boost::shared_ptr<ActivationModelAbstract> activation,
60 boost::shared_ptr<ResidualModelAbstract> residual);
70 boost::shared_ptr<ResidualModelAbstract> residual);
80 virtual void calc(
const boost::shared_ptr<CostDataAbstract>& data,
const Eigen::Ref<const VectorXs>& x,
81 const Eigen::Ref<const VectorXs>& u);
90 virtual void calcDiff(
const boost::shared_ptr<CostDataAbstract>& data,
const Eigen::Ref<const VectorXs>& x,
91 const Eigen::Ref<const VectorXs>& u);
103 virtual void print(std::ostream& os)
const;
113 template <
typename _Scalar>
115 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
117 typedef _Scalar Scalar;
121 typedef typename MathBase::MatrixXs MatrixXs;
123 template <
template <
typename Scalar>
class Model>
126 Arr_Rx(model->get_residual()->get_nr(), model->get_state()->get_ndx()),
127 Arr_Ru(model->get_residual()->get_nr(), model->get_nu()) {
134 using Base::activation;
141 using Base::residual;
150 #include "crocoddyl/core/costs/residual.hxx"
152 #endif // CROCODDYL_CORE_COSTS_RESIDUAL_COST_HPP_