Rapid Node Connecting/Disconnecting
A project I am working on needs the ability to rapidly create/connect and disconnect nodes from ROS. This could happen on the order of 20 nodes created and then destroyed in 15 seconds, all requesting data from other publishing nodes or through services. This would happen at random times throughout the run time of the robot.
I am assuming that ROS was not designed with this in mind, but I was wondering if anyone knew what behavior ROS would exhibit? e.g. significant latency in the transport due to overhead of connecting, etc.
Thanks a lot!
hello, I just wondered if you may use timers to subscribe topics then retrieve data then disable the timer ? but i guess you want much more complicated stuff than that
Can you provide more information on why you need to do this? It's possible that there is a more ROS-like way to achieve whatever you're looking for.
There are possibly other ways of doing it that we have been investigating. The issue here is that we have an existing code base that we would like to connect to ROS, but that would include this rapid connecting issue unless we make major modifications.
@joq, I figured that this would be an issue and not in the design. You say there is long timeout after a node has left (which is ok), but what about connecting? Or are these two things interrelated in their effect on they system? Due to my job, I'm not able to give application details. Thanks.
Connecting nodes and subscribing to topics is not fast. I would encourage you to consider connecting each node as it starts. Use a topic or service to activate or deactivate them.