10 #ifndef CROCODDYL_MULTIBODY_RESIDUALS_CONTACT_CONTROL_GRAVITY_HPP_
11 #define CROCODDYL_MULTIBODY_RESIDUALS_CONTACT_CONTROL_GRAVITY_HPP_
13 #include "crocoddyl/core/residual-base.hpp"
14 #include "crocoddyl/core/utils/exception.hpp"
15 #include "crocoddyl/multibody/data/contacts.hpp"
16 #include "crocoddyl/multibody/states/multibody.hpp"
39 template <
typename _Scalar>
43 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
45 typedef _Scalar Scalar;
53 typedef typename MathBase::VectorXs VectorXs;
54 typedef typename MathBase::MatrixXs MatrixXs;
63 const std::size_t nu);
73 boost::shared_ptr<StateMultibody> state);
83 virtual void calc(
const boost::shared_ptr<ResidualDataAbstract>& data,
84 const Eigen::Ref<const VectorXs>& x,
85 const Eigen::Ref<const VectorXs>& u);
97 virtual void calc(
const boost::shared_ptr<ResidualDataAbstract>& data,
98 const Eigen::Ref<const VectorXs>& x);
108 virtual void calcDiff(
const boost::shared_ptr<ResidualDataAbstract>& data,
109 const Eigen::Ref<const VectorXs>& x,
110 const Eigen::Ref<const VectorXs>& u);
123 virtual void calcDiff(
const boost::shared_ptr<ResidualDataAbstract>& data,
124 const Eigen::Ref<const VectorXs>& x);
137 virtual void print(std::ostream& os)
const;
145 typename StateMultibody::PinocchioModel pin_model_;
148 template <
typename _Scalar>
151 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
153 typedef _Scalar Scalar;
158 typedef pinocchio::DataTpl<Scalar> PinocchioData;
160 template <
template <
typename Scalar>
class Model>
163 :
Base(model, data) {
172 "Invalid argument: the shared data should be derived from "
173 "DataCollectorActMultibodyInContactTpl");
177 fext = d->contacts->fext;
182 boost::shared_ptr<ActuationDataAbstractTpl<Scalar> >
184 pinocchio::container::aligned_vector<pinocchio::ForceTpl<Scalar> >
197 #include "crocoddyl/multibody/residuals/contact-control-gravity.hxx"
Abstract class for the actuation-mapping model.
Abstract class for residual models.
boost::shared_ptr< StateAbstract > state_
State description.
std::size_t nu_
Control dimension.
State multibody representation.
const boost::shared_ptr< PinocchioModel > & get_pinocchio() const
Return the Pinocchio model (i.e., model of the rigid body system)
MatrixXs Ru
Jacobian of the residual vector with respect the control.
MatrixXs Rx
Jacobian of the residual vector with respect the state.
DataCollectorAbstract * shared
Shared data allocated by the action model.
VectorXs r
Residual vector.