ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I decided there was apparently no good way to do this in ROS, and there also was no good way to spawn nodes at runtime. To solve both problems, I created a package called node_director: https://github.com/MisoRobotics/node_director A node_director node allows runtime spawning of nodes ROS is aware of (accessible via rosrun), keeps track of those child processes, and terminates all managed child processes/nodes when the parent node_director dies.

To answer the specific original question, I just instruct node_director (via a ROS service) to spawn the usb_cam nodes rather than starting the processes directly from the spawner process.