New Discovery Server

We also prepared a full tutorial within the ROS Docs:

ROS Docs - Discovery Server Tutorial

1 Like

I was re-reading this for a separate thing and I think you may find this interesting, specially Modifying remote servers list at run time. You can read more about it here.

7 Likes

Hi, what’s in the tutorial works in the localhost setting but not across multiple machines (in the same network). Can you guess what I am missing?

Hi @yjkim046,

I don’t know what exactly is that you’re doing but I can tell you what you’d need to modify to make the example work across machines:

  1. The discovery server should listen in an IP on the same LAN as the other machines. You can specify the server’s listening address with the --ip-address option.
  2. When setting the ROS_DISCOVERY_SERVER environment variable, you should set it to the listening address of the server.

Let’s say you have 3 machines with the following IPs:

Machine IP Application run
A 192.168.1.10 Discovery Server
B 192.168.1.11 talker
C 192.168.1.12 listener

Then, you’d need to run:

Machine A
fastdds discovery -i 0 --ip-address 192.168.1.10
Machine B
export ROS_DISCOVERY_SERVER="192.168.1.10:11811"
ros2 run demo_nodes_cpp talker
Machine C
export ROS_DISCOVERY_SERVER="192.168.1.10:11811"
ros2 run demo_nodes_cpp listener