setNodeName in C++
Hi,
Please pardon me if this is a stupid question. It has been a while since I have used ROS. I have a talker/listener framework setup, but ideally, I would like to have one talker communicate with multiple listeners using the same codebase (by changing the name of the listener node with an argument). When I try to run multiple listeners now, the listener that was active shutdowns because "a new node registered with the same name".
I see here: http://answers.ros.org/question/33358/node-name-collision-with-multiple-talker-node-instances/ that it was a similar problem and the answer was to set the name using a node configuration.
I am trying to write this in C++ and I searched through all of my header files, but I do not see that function anywhere. I see that function mentioned in rosjava (http://www.roschina.net/ros/www.ros.org/wiki/doc/api/rosjava/html/classorg_1_1ros_1_1node_1_1NodeConfiguration.html).
Thank you very much.
Shawn