ros-industrial-consortium / descartes

ROS-Industrial Special Project: Cartesian Path Planner
Apache License 2.0
126 stars 92 forks source link

Serializing and deserializing ladder graph? #206

Closed yijiangh closed 6 years ago

yijiangh commented 6 years ago

Hi everyone,

I'm writing to ask for help and advice on the implementation of serialization and deserialization of ladder graph.

In my application, the ladder graph might take quite some time (up to 40 min) to compute. And this heavy computation makes debugging for any downstream process time consuming and hard.

Thus, I'm wondering if we can save (serializing) the ladder graph once it's computed and parse it back if needed? In this way, I can abort the program, change code, launch, deserialize the ladder graph and go directly to the bugs down the road.

I am thinking about creating a message type for ladder graph, and use similar techniques used in Godel's param_helpers or trajectory library. But since the ladder graph tends to be huge, this might not be a good solution.

Any comment or idea on this? If creating an msg is a feasible solution, any ideas on the design of the msg to make the serialization process more efficient? Could this feature be helpful for the broader user community of Descartes?

Thanks!

shaun-edwards commented 6 years ago

I believe the underlying graph is a boost graph. Is there any reason not to serialize the graph directly...assuming boost provides such functionality?

yijiangh commented 6 years ago

@shaun-edwards Oh sorry, I forgot to mention that I'm working on kinetic-devel, where @Jmeyer1292 implemented a customized ladder graph without using the boost architecture...

yijiangh commented 6 years ago

I wrote and tested a descartes_msgs package and a descartes_parser package. They just wrap the ladder graph data into corresponding msgs to allow saving and parsing. The solution is not so elegant but I have tested them in my framefab app and they work pretty well.

Not sure if this issue and these prototyped solutions could be useful for anyone else, but any comment and suggestion is warmly welcomed!