Hello all
I have a ROS2 network with multiple devices. Over time the devices’ bond change, so it could be connected over one network at the start and with another later on.
At the moment the devices can discover each other, but when the network link between two of them changes they lose connection for about 250 seconds
Any idea how I could do a periodic peer re-discovery or something analog?
More details:
The two networks I’m using are as follows:
The main one is a direct LAN link, but that has a limited range, so when the two devices loose sight of each other it switches to the second network;
The second one is a global WAN link using 4G modem and linked together using a ZeroTier VPN
I hope someone can help me as this 250s delay between rediscovery is too long for my application
I am aware that this is a question, and as such belongs on ROS Answers, but I think it could spark a healthy discussion in the community about how people are dealing with mobile networks over time and re-discovery.
@Vicidel Can you add some more context to the situation, like a network diagram and what RMW implementation you are using?
The discovery server available in FastDDS would massively reduce re-discovery time. Because it is a pre-configured IP, as soon as a device has network access again it can contact the discovery server, update its own information, and grab the information on peers. Experimentation is required to find out just how long this form of discovery would take, but I’m sure @Jaime_Martin_Losa can provide more details.
@Katherine_Scott I am using the default ROS2 RWM that comes in base ROS2 installation. If it matters I’m using ROS2 in a docker built onto the base image ros:foxy-ros-base-focal
I would be happy to provide a network diagram, but am clueless on how to generate/draw it. Would a hand drawn one help or would you need more?
@gbiggs just to be sure you are talking about this right? ROS2 discovery server link
I saw it but considered it wasn’t good for my application because I would need to know the exact IP of one of the two devices. I would much prefer to have automatic discovery as the design would need to be scalable as much as possible and I cannot keep track of all the IPs of the devices running the discovery servers.
@galou I already have a stable IPv4 address from the ZeroTier VPN. I’m also investigating the VPN itself as it could be another source of issue. It allocates an IPv4 to both devices which enable them to see each other even when both are on the global WAN.
Thanks for raising a question on an important topic.
One more method to reduce latency in the WAN over 4G/5G case is to choose a subscription plan optimized for machine type communication. Here I am assuming that your existing subscription is meant for human-oriented traffic (videos, voice calls, browser data etc). Talk to your network operator for options such as dedicated low-latency bearers, fixed IP addresses, and network-hosted discovery servers.
Here are two examples of operator products designed for machine type communication: (1) verizon (2) telia
Since machine type communication is a relatively new use-case in telecommunication networks, operators do not (yet) have a one-size-fits-all subscription plan for machines. Each machine type communication is planned for on a case-to-case basis.
@anamud I’m based in Switzerland, and am using a data only service (DigitalRepublic).
Some M2M operators seem to exist here, but I think that our current operator itself is not the issue.
Network hosted discovery servers could be an option, but I’m not sure how I would go towards this.