Ask Your Question
1

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="publisher_node.py"/>

<!-- 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="subscriber_node.py" 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="subscriber_node.py" 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
4

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

Lorenz gravatar image

You are using remap on a global scope. Try:

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

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

Stats

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

Seen: 799 times

Last updated: May 23 '12