ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org

ROS2 peer network discovery in evolving networks

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

Best,
Victor

FYI:

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?

@Jaime_Martin_Losa @joespeed Some recommendations for solutions might be good.

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.

Would cjdns (GitHub - cjdelisle/cjdns: An encrypted IPv6 network using public-key cryptography for address allocation and a distributed hash table for routing.) be a solution to have a stable IPv6 address?

Thank you for your answers!

@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.