Skip to content
Snippets Groups Projects
Commit ea66b806 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[se3] add serialization methods

parent b92c6abe
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "MathDefs.h" #include "MathDefs.h"
#include "serialization/archive.hpp" #include "serialization/archive.hpp"
#include "serialization/eigen-matrix.hpp" #include "serialization/eigen-matrix.hpp"
#include <boost/serialization/shared_ptr.hpp>
#include <functional> #include <functional>
...@@ -73,5 +74,6 @@ struct curve_abc : std::unary_function<Time, Point>, public serialization::Seria ...@@ -73,5 +74,6 @@ struct curve_abc : std::unary_function<Time, Point>, public serialization::Seria
} }
} }
}; };
BOOST_SERIALIZATION_ASSUME_ABSTRACT(curve_abc)
} // namespace curves } // namespace curves
#endif //_STRUCT_CURVE_ABC #endif //_STRUCT_CURVE_ABC
#ifndef _STRUCT_SE3_CURVE_H #ifndef _STRUCT_SE3_CURVE_H
#define _STRUCT_SE3_CURVE_H #define _STRUCT_SE3_CURVE_H
#include "fwd.h"
#include "MathDefs.h" #include "MathDefs.h"
#include "curve_abc.h" #include "curve_abc.h"
#include "so3_linear.h" #include "so3_linear.h"
...@@ -191,6 +192,21 @@ struct SE3Curve : public curve_abc<Time, Numeric, Safe, Eigen::Transform<Numeric ...@@ -191,6 +192,21 @@ struct SE3Curve : public curve_abc<Time, Numeric, Safe, Eigen::Transform<Numeric
if (version) { if (version) {
// Do something depending on version ? // Do something depending on version ?
} }
//register derived class
ar.template register_type<bezier_curve<Scalar, Scalar, Safe, pointX_t> >();
ar.template register_type<cubic_hermite_spline<Scalar, Scalar, Safe, pointX_t> >();
ar.template register_type<exact_cubic<Scalar, Scalar, Safe, pointX_t> >();
ar.template register_type<piecewise_curve<Scalar, Scalar, Safe, pointX_t,
std::vector<pointX_t, Eigen::aligned_allocator<pointX_t> >, polynomial_t> >();
ar.template register_type<piecewise_curve<Scalar, Scalar, Safe, pointX_t,
std::vector<pointX_t, Eigen::aligned_allocator<pointX_t> >, bezier_curve<Scalar, Scalar, Safe, pointX_t> > >();
ar.template register_type<piecewise_curve<Scalar, Scalar, Safe, pointX_t,
std::vector<pointX_t, Eigen::aligned_allocator<pointX_t> >, cubic_hermite_spline<Scalar, Scalar, Safe, pointX_t> > >();
ar.template register_type<polynomial_t>();
ar.template register_type<SO3Linear_t>();
ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(curve_abc_t);
ar& boost::serialization::make_nvp("dim", dim_); ar& boost::serialization::make_nvp("dim", dim_);
ar& boost::serialization::make_nvp("translation_curve", translation_curve_); ar& boost::serialization::make_nvp("translation_curve", translation_curve_);
ar& boost::serialization::make_nvp("rotation_curve", rotation_curve_); ar& boost::serialization::make_nvp("rotation_curve", rotation_curve_);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment