ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

remap does not affect subscription addresses?

asked 2012-05-23 03:12:55 -0500

Tom Larkworthy gravatar image

updated 2012-05-27 17:33:38 -0500

Kevin gravatar image

I was expecting <remap> to affect the relatively addressed subscriptions of a node, but it doesn't seem to.

<node name="publiser" pkg="hwu_meta_data" type=""/>

<!-- the following subscriber does not hear the publisher because it's
in the wrong namespace -->
<node ns="subnamespace2" name="ns_subscriber" pkg="hwu_meta_data"
      type="" output="screen"/>

<!-- the remap moves BOTH the node AND its associated meta_data -->
<!-- NOTE: it seems the chatter topic subscribed to by remapped_ns_subcriber is not remapped so this does not receive delivery -->
<remap from="subnamespace3" to="/"/>
<node ns="subnamespace3" name="remapped_ns_subcriber"
      pkg="hwu_meta_data" type="" output="screen"/>

Is that deliberate or am I doing something wrong? (the publisher and subscriber implementations are essentially identical to the beginner tutorials)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-05-23 03:20:46 -0500

Lorenz gravatar image

You are using remap on a global scope. Try:

  <node name="publiser" pkg="hwu_meta_data" type="" />
  <node ns="subnamespace3" name="remapped_ns_subcriber"
        pkg="hwu_meta_data" type="" output="screen">
    <remap from="your_topic" to="/your_topic" />

This requires to explicitly remap each topic you use but in my opinion that's much cleaner anyway.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-05-23 03:12:55 -0500

Seen: 1,153 times

Last updated: May 23 '12