Commit d42beb9e authored by jcarpent's avatar jcarpent
Browse files

[C++][Doc] Clean model

parent 16f2d75a
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
#include "pinocchio/multibody/fwd.hpp" #include "pinocchio/multibody/fwd.hpp"
#include "pinocchio/multibody/frame.hpp" #include "pinocchio/multibody/frame.hpp"
#include "pinocchio/multibody/joint/joint.hpp" #include "pinocchio/multibody/joint/joint.hpp"
#include "pinocchio/tools/string-generator.hpp"
#include <iostream> #include <iostream>
#include <Eigen/Cholesky> #include <Eigen/Cholesky>
...@@ -99,14 +98,18 @@ namespace se3 ...@@ -99,14 +98,18 @@ namespace se3
/// \brief Vector of operational frames registered on the model. /// \brief Vector of operational frames registered on the model.
std::vector<Frame> frames; 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; Motion gravity;
/// \brief Default 3D gravity vector (=(0,0,-9.81)). /// \brief Default 3D gravity vector (=(0,0,-9.81)).
static const Eigen::Vector3d gravity981; static const Eigen::Vector3d gravity981;
/// \brief Default constructor /// \brief Default constructor. Builds an empty model with no joints.
Model() Model()
: nq(0) : nq(0)
, nv(0) , nv(0)
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#define __se3_model_hxx__ #define __se3_model_hxx__
#include "pinocchio/spatial/fwd.hpp" #include "pinocchio/spatial/fwd.hpp"
#include "pinocchio/tools/string-generator.hpp"
#include <boost/bind.hpp> #include <boost/bind.hpp>
...@@ -31,10 +32,10 @@ namespace se3 ...@@ -31,10 +32,10 @@ namespace se3
{ {
os << "Nb bodies = " << model.nbody << " (nq="<< model.nq<<",nv="<<model.nv<<")" << std::endl; os << "Nb bodies = " << model.nbody << " (nq="<< model.nq<<",nv="<<model.nv<<")" << std::endl;
for(Model::Index i=0;i<(Model::Index)(model.nbody);++i) 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; return os;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment