Commit d08c5b39 authored by Joseph Mirabel's avatar Joseph Mirabel
Browse files

Serialization of CenterOfMassComputation

parent 7ff29d6d
......@@ -21,6 +21,8 @@
# include <pinocchio/multibody/data.hpp> // ::pinocchio::Data
# include <hpp/util/serialization-fwd.hh>
# include <hpp/pinocchio/fwd.hh>
# include <hpp/pinocchio/device.hh>
......@@ -103,6 +105,9 @@ namespace hpp {
DevicePtr_t robot_;
// Root of the subtrees
JointRootIndexes_t roots_;
CenterOfMassComputation() {}
HPP_SERIALIZABLE();
}; // class CenterOfMassComputation
} // namespace pinocchio
} // namespace hpp
......
......@@ -18,15 +18,18 @@
#include <algorithm>
#include <boost/foreach.hpp>
#include <boost/serialization/vector.hpp>
#include <pinocchio/algorithm/center-of-mass.hpp>
#include <pinocchio/algorithm/copy.hpp>
#include <hpp/util/exception-factory.hh>
#include <hpp/util/serialization.hh>
#include "hpp/pinocchio/joint.hh"
#include <hpp/pinocchio/joint-collection.hh>
#include "hpp/pinocchio/device.hh"
#include "hpp/pinocchio/serialization.hh"
namespace hpp {
namespace pinocchio {
......@@ -169,5 +172,15 @@ namespace hpp {
CenterOfMassComputation::~CenterOfMassComputation ()
{}
template<class Archive>
void CenterOfMassComputation::serialize(Archive & ar, const unsigned int version)
{
(void) version;
ar & BOOST_SERIALIZATION_NVP(robot_);
ar & BOOST_SERIALIZATION_NVP(roots_);
}
HPP_SERIALIZATION_IMPLEMENT(CenterOfMassComputation);
} // namespace pinocchio
} // namespace hpp
Markdown is supported
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