9 #ifndef CROCODDYL_MULTIBODY_RESIDUALS_STATE_HPP_
10 #define CROCODDYL_MULTIBODY_RESIDUALS_STATE_HPP_
12 #include "crocoddyl/core/fwd.hpp"
13 #include "crocoddyl/multibody/fwd.hpp"
14 #include "crocoddyl/core/state-base.hpp"
15 #include "crocoddyl/core/residual-base.hpp"
16 #include "crocoddyl/multibody/states/multibody.hpp"
34 template <
typename _Scalar>
37 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
39 typedef _Scalar Scalar;
46 typedef typename MathBase::VectorXs VectorXs;
47 typedef typename MathBase::MatrixXs MatrixXs;
57 const std::size_t nu);
98 virtual void calc(
const boost::shared_ptr<ResidualDataAbstract>& data,
const Eigen::Ref<const VectorXs>& x,
99 const Eigen::Ref<const VectorXs>& u);
108 virtual void calcDiff(
const boost::shared_ptr<ResidualDataAbstract>& data,
const Eigen::Ref<const VectorXs>& x,
109 const Eigen::Ref<const VectorXs>& u);
126 virtual void print(std::ostream& os)
const;
143 #include "crocoddyl/multibody/residuals/state.hxx"
Abstract class for residual models.
bool u_dependent_
Label that indicates if the residual function depends on u.
boost::shared_ptr< StateAbstract > state_
State description.
std::size_t nu_
Control dimension.
VectorXs unone_
No control vector.
ResidualModelStateTpl(boost::shared_ptr< typename Base::StateAbstract > state, const std::size_t nu)
Initialize the state residual model.
ResidualModelStateTpl(boost::shared_ptr< typename Base::StateAbstract > state, const VectorXs &xref, const std::size_t nu)
Initialize the state residual model.
virtual void print(std::ostream &os) const
Print relevant information of the state residual.
virtual void calc(const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)
Compute the state residual.
ResidualModelStateTpl(boost::shared_ptr< typename Base::StateAbstract > state)
Initialize the state residual model.
void set_reference(const VectorXs &reference)
Modify the reference state.
virtual void calcDiff(const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)
Compute the Jacobians of the state residual.
const VectorXs & get_reference() const
Return the reference state.
ResidualModelStateTpl(boost::shared_ptr< typename Base::StateAbstract > state, const VectorXs &xref)
Initialize the state residual model.
State multibody representation.