How to correctly respawn a nodelet manager

asked 2016-09-28 06:36:02 -0500

Mehdi. gravatar image

updated 2016-09-28 06:52:48 -0500

I have a bringup launch file to start my robot and all its components. For the 3d sensors I start a nodelet manager that will load the sensor drivers in a nodelet for each sensor. For normal nodes, if I wanted to change something I just reload the parameters I need or change something in my code then compile and kill the node which was started with a "respawn" flag. Is there a way to do that for a nodelet_manager so that it restarts and reloads the nodelets it previously had before killing?

The only way that comes to my mind now is to create a python node that does a system call to call roslaunch. And the roslaunch it calls will start a nodelet manager and load all the needed nodelets. If this node is killed it will kill the nodelet manager before quitting and then be automatically respawn thus recalling the same roslaunch again. I need this to avoid having to restart the whole bringup whenever I change one node.

edit retag flag offensive close merge delete