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

Revision history [back]

One option is to have whatever node is using the image topics (and presumably contains the logic about what image topic it wants at a given time) unsubscribe/subscribe on demand. In theory, unsubscribing and then resubscribing would be less expensive than starting/stopping the node. This does assume the camera node does a lazy publish (that is, it checks if there is a subscriber, and if not it won't bother grabbing a frame from the camera and publishing it), however, this is typically quite common.

Another option would be to use dynamic reconfigure to start/stop the publishing, but this would certainly require modifying the camera node as I'm not aware of any camera nodes that have such an interface.