title: ROS : Subscribe to topic in different namespace
body: <p>I just started to use ROS tonight.</p>
  
  <p>What I'm trying to achieve is this:</p>
  
  <p><a href="https://i.stack.imgur.com/bV4m3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bV4m3.jpg" alt="enter image description here"></a></p>
  
  <p>This is what I have already done :</p>
  
  <ul>
  <li><p>publish and subscribe to topic_b.</p></li>
  <li><p>publish to ns1/topic_a (I checked with <code>rostopic echo /ns1/topic_a</code>)</p></li>
  <li><p>publish to ns2/topic_a (I checked with <code>rostopic echo /ns2/topic_a</code>)</p></li>
  <li><p>subscribe to ns2/topic_a (<code>ros::Subscriber sub = n.subscribe("topic_a", 1000, callback);</code>)</p></li>
  </ul>
  
  <p>What I don't know how to do :</p>
  
  <ul>
  <li>subscribe to ns1/topic_a from node_b.</li>
  </ul>
  
  <p>After reading the tutorial, I tried this :</p>
  
  <p>1/ In node_b.cpp, I subscribed to /topic_a_temp.</p>
  
  <p>2/ In the launch file, inside the node_b tags, I added <code>&lt;remap from="topic_a_temp" to="ns1/topic_a"&gt;</code></p>
  
  <p>But it doesn't work.</p>
  
  <p>It may be very basic since I'm a beginner but I don't know how to read the ns1 topic from the ns2 node.</p>
  
  <p>Thank you for your help,</p>