[Discourse.ros.org] [Next Generation ROS] Update time for get_node_names

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Discourse.ros.org] [Next Generation ROS] Update time for get_node_names

Dirk Thomas via ros-users


Hi,
I wondered how long the get_node_names method in the rclcpp graph interface takes until it notices that a node was shutdown or a new node was added assuming I used Fast-RTPS as middleware?

Another question: Are there any plans to implement some kind of callbacks/events that get called in case node was added / shutdown from the system?





---
[Visit Topic](https://discourse.ros.org/t/update-time-for-get-node-names/2333/1) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Discourse.ros.org] [Next Generation ROS] Update time for get_node_names

Dirk Thomas via ros-users


Just to push this topic a bit.
I was asking this question because I did some tests with two nodes. I was very surprised when I found out that it takes just a few seconds until a newly started node is shown in the list of the previous started node.
But if I stop a node it takes about 5 minutes until the change is shown in the list of the node that is still running.

I just took a look at the implementation below but wasn't able to find any information in the fast rtps code how long it should take until the shutdown of a node is known by the rest of the system.





---
[Visit Topic](https://discourse.ros.org/t/update-time-for-get-node-names/2333/2) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Discourse.ros.org] [Next Generation ROS] Update time for get_node_names

Dirk Thomas via ros-users
In reply to this post by Dirk Thomas via ros-users


The fact that it takes so long for a node to go away might be related to the Fast-RTPS settings or perhaps if the node is not terminated cleanly.

@karsten implemented this, so I'll let him chime in, but we might need to change the implementation of this anyways to address node name uniqueness or the mapping of nodes to participants.

We have the graph API for changes to the graph, but I think it currently does not get notified when new nodes are added or when nodes are removed. I guess @karsten just didn't implement that part when doing the initial implementation. Again the behavior (or underlying mechanism) may need to change in the future.





---
[Visit Topic](https://discourse.ros.org/t/update-time-for-get-node-names/2333/3) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Discourse.ros.org] [Next Generation ROS] Update time for get_node_names

Dirk Thomas via ros-users
In reply to this post by Dirk Thomas via ros-users


Sorry for coming back on this so late.

The `getParticipantNames` [function](https://github.com/ros2/rmw_fastrtps/blob/master/rmw_fastrtps_cpp/src/rmw_node_names.cpp#L56) has been added to FastRTPS to get going with exposing node names. It's clearly a one-directional implementation, saying that every time you ask for available nodes, you basically ask FastRTPS for available participants. I am not really familiar about the underlying specifics within FastRTPS to give qualified feedback on why it takes that long. There is no API currently for the rosgraph, notifying about node changes, only about topics (AFAIK).

I believe that FastRTPS has support for callbacks on node changes, but I have to look into it. For the time being, I would invite you to open a github issue for that particular scenario of yours, maybe posting your code snippet and we can pick it up from there.





---
[Visit Topic](https://discourse.ros.org/t/update-time-for-get-node-names/2333/4) or reply to this email to respond.


If you do not want to receive messages from ros-users please use the unsubscribe link below. If you use the one above, you will stop all of ros-users from receiving updates.
______________________________________________________________________________
ros-users mailing list
[hidden email]
http://lists.ros.org/mailman/listinfo/ros-users
Unsubscribe: <http://lists.ros.org/mailman//options/ros-users>
Loading...