[WIP] LocalParametrization Serialization
A simple example of non-intrusive serialization using boost.
Depends on !82 (merged)
Merge request reports
Activity
This pr proposed serialization using boost. Since we are using std smart pointers all over the place boost might not be an ideal choice anymore for the reason that its support to std smart pointers come with version 1.56. Since everybody may not have this version or later it might be a good move to pick another library now.
Maybe cerealsJust for the thinking.
I read this about serialization, in https://isocpp.org/wiki/faq/serialization#serialize-overview: << Use the most sophisticated solution when the objects to be serialized contain pointers to other objects, and when those pointers form a graph that might have cycles or joins.>>
Our wolf tree is in fact not a tree: it's a graph. Then, it is unclear if it is a cyclic graph or not: if the weak_ptr count as pointers, then it is cyclic. Otherwise, if we only count the shared_ptr, then it is acyclic. This seems to matter quite significatively. Our graph might not have cycles, but it definitely has joins (at the constraints).
NOTE: Also, I am unsure at this point: why do we need serialization? Or more concisely: why do we need serialization any time soon? My question comes out of ignorance, but it goes to the point of : doing the right job at the right time.
Edited by Joan Solà OrtegaAs mentioned before I have been using Boost serialization for my place recognition framework, especially for the feature tree (which is basically pointers). One of the sweet point of this lib is that it can tracks objects by memory address and so avoid (de)serializing twice the same object. Which means that in the case of pointers there will be a single object instantiated and all pointers properly set. A little more info here.
I am not sure if this kind of consideration is also taken into account as easily as in boost in other libraries.As for why we might need it, the very first answer is save/load a wolf problem. In the perspective of a long-term SLAM I think we should be able to save a problem, turn of the robot and resume the construction of the problem the next day. Further consideration could be 'sending' part or all the problem over a network, think multi-robot SLAM.
Now regarding the priority there are more urgent things to do, in this line of sight logging #110 (closed) is probably on top.Why LocalParametrization ? Simply because I had to start somewhere and show you all an example of how to enable the serialization for a given class. Also this particular class let me implement a
non-intrusive
serialization, which means I could define the seria outside the class itself.
This being said, this pr is outdated (and broken) and we might need to look at different serialization library as Boost does not support std smart pointers before version 1.56.Closing this PR since it is replaced by !122 (merged).