Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 1.03 KB

remapping.md

File metadata and controls

30 lines (22 loc) · 1.03 KB

Remapping

Consider i am writing one library with a node, which subscribes to some topic and processes it, and publishes another topic.

The one who is using the program, may have different topic name, now he have edit my code and change the name of the topic my code subscribes to?

No, we have something called remapping. We don't have to edit the code.

Consider my node subscribes to the topic /camera_image and publishes /camera_image_improved

And want give image from the topic /kinetic/image and wants output as /output

<node name='mynode' type="sample_node" pkg="sample_pkg" >
    <remap from="/camera_image" to="/kinetic/image"/>
    <remap from="/camera_image_improved" to="/output"/>
</node>

or

rosrun sample_pkg sample_node camera_image:=/kinetic/image camera_image_improved:=/output

Resources

Ask yourself

  • For topics okay, if I want to remap parameters, is it possible to do?