diff --git a/src/multibody/model.hpp b/src/multibody/model.hpp index 2ba32d7092e5b9a723cbcc4f855209aeed3e88f5..c1ff276dab7795a34f5e1468ee2a60c331d1cb83 100644 --- a/src/multibody/model.hpp +++ b/src/multibody/model.hpp @@ -27,7 +27,6 @@ #include "pinocchio/multibody/fwd.hpp" #include "pinocchio/multibody/frame.hpp" #include "pinocchio/multibody/joint/joint.hpp" -#include "pinocchio/tools/string-generator.hpp" #include <iostream> #include <Eigen/Cholesky> @@ -99,14 +98,18 @@ namespace se3 /// \brief Vector of operational frames registered on the model. std::vector<Frame> frames; + + /// \brief Vector of subtrees + /// subtree[j] corresponds to the subtree supported by the joint j. + std::vector<IndexVector> subtrees; - /// \brief Spatial gravity + /// \brief Spatial gravity of the model. Motion gravity; /// \brief Default 3D gravity vector (=(0,0,-9.81)). static const Eigen::Vector3d gravity981; - /// \brief Default constructor + /// \brief Default constructor. Builds an empty model with no joints. Model() : nq(0) , nv(0) diff --git a/src/multibody/model.hxx b/src/multibody/model.hxx index 20759ae3dc625bae3c2eebadf9797c54f3504fef..ab66f00861e018a0a26f58a431841990d022eccb 100644 --- a/src/multibody/model.hxx +++ b/src/multibody/model.hxx @@ -20,6 +20,7 @@ #define __se3_model_hxx__ #include "pinocchio/spatial/fwd.hpp" +#include "pinocchio/tools/string-generator.hpp" #include <boost/bind.hpp> @@ -31,10 +32,10 @@ namespace se3 { os << "Nb bodies = " << model.nbody << " (nq="<< model.nq<<",nv="<<model.nv<<")" << std::endl; for(Model::Index i=0;i<(Model::Index)(model.nbody);++i) - { - os << " Joint "<<model.names[i] << ": parent=" << model.parents[i] << std::endl; - } - + { + os << " Joint "<< model.names[i] << ": parent=" << model.parents[i] << std::endl; + } + return os; }