title: Unsubscribe from a topic and subscribe from a new one runtime (C++) (ROS)
body: <p>I'm using a ROS node (C++ code) to perform some image processing reading images from different visual sensors living in a simulator.
  I have a big problem that, so far, is without solution...</p>
  
  <p>let's say that my node is active and is performing some operations on an image acquired from a topic"A"; at a certain point (so at <strong>run time</strong>) i need to unsubscribe from this topic"A" and subscribe from another topic"B" (<strong>the name of this topic"B" is communicated to the node by another subscriber</strong>) to read images from another visual sensor: i'd like to do that just changing the topic name (using a string variable for instance) and using the same callback used for topic"A".</p>
  
  <p>the difficulties are the following:</p>
  
  <ul>
  <li><p>i cannot read the all images and choose the one i need: the sensor are too many to handle such a stream of data and, furthermore, this system is not scalable at all.</p></li>
  <li><p>i need to declare this new subscriber in a scope that "lives" sufficiently long for the process of reading from the topic (it is the reason, i think, the subscribers are defined in the main scope, before the while) but, in the same time, in a scope that gives me the possibility to update the topic (so a sort of loop and not in the part before the while that is performed just one time).</p></li>
  </ul>
  
  <p>please help me...i really don't know how to do that</p>