Turning ROS nodes on and off (subsumption style)?
Hello!
Is there a good ROS-like way for turning nodes on and off and controlling how different nodes access shared resources? For example, suppose I am creating a voice-command demo and when I say "track face" I want a face tracker node to run. But when I say "track color" I want a color tracker node to run instead while the face tracker is turned off or at least suspended.
Similarly, suppose I am running a head tracking node that controls a pair of pan and tilt servos but I want to be able to manually override control of the servos--perhaps only briefly--then have the head tracking continue. (If I run the head tracker and manual control simultaneously, I get jerky servo motion as the two nodes simultaneously publish joint commands.)
The simplest method that comes to mind is to use shell process control (e.g. shlex and subprocess in Python) but that seems a little hacky. Is there a more ROS-like way to do this?
Thanks!
patrick