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

Revision history [back]

click to hide/show revision 1
initial version

You might want to try removing the / from the remaps, I know they can cause issues.

<remap from="original_node" to="new_node"/>

It also looks like your node of type original_node uses the name tag to add the namespace original_node. This means you could also do:

<node name ="new_node" pkg ="test_pkg" type ="original_node" output="screen">

And that might also work.

You might want to try removing the / from the remaps, I know they can cause issues.

<remap from="original_node" to="new_node"/>

It also looks like your node of type original_node uses the name tag to add the namespace original_node. This means you could also do:

<node name ="new_node" pkg ="test_pkg" type ="original_node" output="screen">

And that might also work.

EDIT to respond to your comment:

If 1 already works, then 2 isn't adding anything. Which means the remap simply isn't working. Hence why 3 works.

As for your question about the difference between remap and renaming it: If you check rosnode list you will see that, by renaming, it should also show up as new_node while if remapped correctly it should still show up as original_node.

Remapping is only simply changing the name of the topic to whatever you like. This can be useful if (example) you're using a robot that has the default cmd_vel topic as cmd_vel_unstamped and you need your teleop to work with that. Then you can simply remap your teleop from cmd_vel to cmd_vel_unstamped. Changing the node name in this case would also not solve anything. Teleop would still publish to the wrong topic.

So they're two very different solutions to (in this specific case) the same result.

There is something that I am wondering: Can you even remap a portion of the topic, or a namespace like that?

Which makes me wonder, would you not need to do something like: <remap from="original_node/number_string" to="new_node/123456"/>. Remapping the entire topic and combining the remap and parameter in 1.