Running a parallel function
Hi all,
I have the following problem that I would like your opinions and guidance. I have an outdoor 3D GraphSLAM problem where I am creating a number of local point-cloud maps. These maps are currently stored in a vector array and their number can increase indefinitely depending on how far the robot has traveled. If I try to store/load the maps in files, the process takes too much time to complete inside the programs main callback. So I need somehow to parallelize my store/load process (e.g. create a function that runs in parallel to the rest of the program). I looked in some options that the ROS framework provides such as: a) Asynchronous spinner, b) actionlib, c) other multi-thread solutions. I am kind of new in multi-thread programming in ROS or otherwise, so I would truly appreciate any help or guidance you can give me in this problem.
Thank you in advance,
Akis
How did you implement it?