9 #ifndef CROCODDYL_MULTIBODY_STATES_MULTIBODY_HPP_
10 #define CROCODDYL_MULTIBODY_STATES_MULTIBODY_HPP_
12 #include <pinocchio/multibody/model.hpp>
14 #include "crocoddyl/core/state-base.hpp"
15 #include "crocoddyl/multibody/fwd.hpp"
34 template <
typename _Scalar>
37 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
39 typedef _Scalar Scalar;
42 typedef pinocchio::ModelTpl<Scalar> PinocchioModel;
43 typedef typename MathBase::VectorXs VectorXs;
44 typedef typename MathBase::MatrixXs MatrixXs;
60 virtual VectorXs
zero()
const;
68 virtual VectorXs
rand()
const;
70 virtual void diff(
const Eigen::Ref<const VectorXs>& x0,
71 const Eigen::Ref<const VectorXs>& x1,
72 Eigen::Ref<VectorXs> dxout)
const;
73 virtual void integrate(
const Eigen::Ref<const VectorXs>& x,
74 const Eigen::Ref<const VectorXs>& dx,
75 Eigen::Ref<VectorXs> xout)
const;
76 virtual void Jdiff(
const Eigen::Ref<const VectorXs>&,
77 const Eigen::Ref<const VectorXs>&,
78 Eigen::Ref<MatrixXs> Jfirst, Eigen::Ref<MatrixXs> Jsecond,
79 const Jcomponent firstsecond = both)
const;
81 virtual void Jintegrate(
const Eigen::Ref<const VectorXs>& x,
82 const Eigen::Ref<const VectorXs>& dx,
83 Eigen::Ref<MatrixXs> Jfirst,
84 Eigen::Ref<MatrixXs> Jsecond,
85 const Jcomponent firstsecond = both,
86 const AssignmentOp = setto)
const;
88 const Eigen::Ref<const VectorXs>& dx,
89 Eigen::Ref<MatrixXs> Jin,
90 const Jcomponent firstsecond)
const;
107 boost::shared_ptr<PinocchioModel> pinocchio_;
116 #include "crocoddyl/multibody/states/multibody.hxx"
Abstract class for the state representation.
std::size_t nv_
Velocity dimension.
std::size_t nx_
State dimension.
bool has_limits_
Indicates whether any of the state limits is finite.
std::size_t nq_
Configuration dimension.
VectorXs lb_
Lower state limits.
VectorXs ub_
Upper state limits.
std::size_t ndx_
State rate dimension.
State multibody representation.
virtual void integrate(const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &dx, Eigen::Ref< VectorXs > xout) const
Compute the state manifold integration.
virtual VectorXs zero() const
Generate a zero state.
virtual void diff(const Eigen::Ref< const VectorXs > &x0, const Eigen::Ref< const VectorXs > &x1, Eigen::Ref< VectorXs > dxout) const
Compute the state manifold differentiation.
virtual void Jintegrate(const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &dx, Eigen::Ref< MatrixXs > Jfirst, Eigen::Ref< MatrixXs > Jsecond, const Jcomponent firstsecond=both, const AssignmentOp=setto) const
Compute the Jacobian of the state manifold integration.
const boost::shared_ptr< PinocchioModel > & get_pinocchio() const
Return the Pinocchio model (i.e., model of the rigid body system)
StateMultibodyTpl(boost::shared_ptr< PinocchioModel > model)
Initialize the multibody state.
virtual VectorXs rand() const
Generate a random state.
virtual void JintegrateTransport(const Eigen::Ref< const VectorXs > &x, const Eigen::Ref< const VectorXs > &dx, Eigen::Ref< MatrixXs > Jin, const Jcomponent firstsecond) const
Parallel transport from integrate(x, dx) to x.
virtual void Jdiff(const Eigen::Ref< const VectorXs > &, const Eigen::Ref< const VectorXs > &, Eigen::Ref< MatrixXs > Jfirst, Eigen::Ref< MatrixXs > Jsecond, const Jcomponent firstsecond=both) const
Compute the Jacobian of the state manifold differentiation.