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

A few ways to do it, one of the better ones is to anonymize the node name as mentioned by Dan in the link you provided. See http://www.ros.org/wiki/roscpp/Overview/Initialization%20and%20Shutdown#Initialization_Options

You could also hardcode different names for each listener (not good idea since you'll have multiple source code doing essentially the same thing), or remap the node name at runtime. See http://www.ros.org/wiki/roscpp/Overview/Initialization%20and%20Shutdown#Initializing_the_roscpp_Node