9 #ifndef CROCODDYL_CORE_RESIDUALS_JOINT_ACCELERATION_HPP_
10 #define CROCODDYL_CORE_RESIDUALS_JOINT_ACCELERATION_HPP_
12 #include "crocoddyl/core/actuation-base.hpp"
13 #include "crocoddyl/core/data/joint.hpp"
14 #include "crocoddyl/core/fwd.hpp"
15 #include "crocoddyl/core/residual-base.hpp"
36 template <
typename _Scalar>
40 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
42 typedef _Scalar Scalar;
50 typedef typename MathBase::VectorXs VectorXs;
51 typedef typename MathBase::MatrixXs MatrixXs;
61 const VectorXs& aref,
const std::size_t nu);
72 const VectorXs& aref);
84 const std::size_t nu);
106 virtual void calc(
const boost::shared_ptr<ResidualDataAbstract>& data,
107 const Eigen::Ref<const VectorXs>& x,
108 const Eigen::Ref<const VectorXs>& u);
114 virtual void calc(
const boost::shared_ptr<ResidualDataAbstract>& data,
115 const Eigen::Ref<const VectorXs>& x);
124 virtual void calcDiff(
const boost::shared_ptr<ResidualDataAbstract>& data,
125 const Eigen::Ref<const VectorXs>& x,
126 const Eigen::Ref<const VectorXs>& u);
149 virtual void print(std::ostream& os)
const;
160 template <
typename _Scalar>
163 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
165 typedef _Scalar Scalar;
170 template <
template <
typename Scalar>
class Model>
173 :
Base(model, data) {
179 "Invalid argument: the shared data should be derived from "
180 "DataCollectorJoint");
185 boost::shared_ptr<JointDataAbstractTpl<Scalar> >
joint;
197 #include "crocoddyl/core/residuals/joint-acceleration.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.
std::size_t nr_
Residual vector dimension.
Define a joint-acceleration residual.
ResidualModelJointAccelerationTpl(boost::shared_ptr< StateAbstract > state, const VectorXs &aref)
Initialize the joint-acceleration residual model.
virtual void calc(const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x)
ResidualModelJointAccelerationTpl(boost::shared_ptr< StateAbstract > state, const std::size_t nu)
Initialize the joint-acceleration residual model.
virtual void print(std::ostream &os) const
Print relevant information of the joint-acceleration residual.
ResidualModelJointAccelerationTpl(boost::shared_ptr< StateAbstract > state, const VectorXs &aref, const std::size_t nu)
Initialize the joint-acceleration residual model.
virtual void calc(const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)
Compute the joint-acceleration residual.
void set_reference(const VectorXs &reference)
Modify the reference joint-acceleration vector.
virtual void calcDiff(const boost::shared_ptr< ResidualDataAbstract > &data, const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &u)
Compute the derivatives of the joint-acceleration residual.
const VectorXs & get_reference() const
Return the reference joint-acceleration vector.
virtual boost::shared_ptr< ResidualDataAbstract > createData(DataCollectorAbstract *const data)
Create the joint-acceleration residual data.
ResidualModelJointAccelerationTpl(boost::shared_ptr< StateAbstract > state)
Initialize the joint-acceleration residual model.
Abstract class for the state representation.
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.
DataCollectorAbstract * shared
Shared data allocated by the action model.
boost::shared_ptr< JointDataAbstractTpl< Scalar > > joint
Joint data.