robotology / yarp-ros

YARP support for ROS1.
1 stars 1 forks source link

ROS Nodes registered in ROS Master using the `yarp::os::Node` are not unregistered when the object is deleted/on process exit #16

Open traversaro opened 7 years ago

traversaro commented 7 years ago

If you create a ROS Nodes using YARP, it will not be properly unregistered from the ROS Master once the process is closed.

How to reproduce

Compile and run the example in https://gist.github.com/traversaro/e34c849fff2dd481625ae7a40edb173c#file-main-cpp-L15 , on a computer in which ROS is correctly configured and roscore is running.

After the program has exited, launch the rosnode list command and you will see that the node opened by the example program is still registered:

user@iiticubws003:~/yarp_rosnode_test/build$ rosnode list
/nodeThatWillNotBeUnregisteredFromRosMaster
/rosout
traversaro commented 7 years ago

@aerydna This tutorial http://www.yarp.it/yarp_with_ros_parameters.html can be useful to write a regression test for this bug . It cover communicating with the ROS Parameter server API http://wiki.ros.org/ROS/Parameter%20Server%20API , but if I understand correctly (I am not 100% sure about the carriers used) it could be ported to use the ROS Master API http://wiki.ros.org/ROS/Master_API .