A demo showing how to use DDS Router and Husarnet to connect remote ROS 2 nodes over the Internet.
Prerequisites
I use the latest compose file spec (eg. no
version: "3.7"on top of..yamlfile and usingcompose.yamlinstead ofdocker-compose.yaml). Therefore make sure you use Docker Compose V2.Tested on the following host:
$ docker --version Docker version 20.10.10, build b485636 $ docker compose version Docker Compose version v2.2.3
Before running examples get your Husarnet Join Code. You will use it to connect Docker containers to the same VPN network.
At first rename .env.template file to .env.
You will find your Join Code at https://app.husarnet.com
-> Click on the desired network
-> Add element button
-> Join code tab
…and change the JOINCODE variable in the .env files.
You can execute those commands on the same, or on different hosts in different LANs.
docker compose -f compose.ds.yaml updocker compose -f compose.talker.yaml updocker compose -f compose.listener.yaml upFiles ./router-config.*.yaml are attached as volumes to dds-router services. The DDS Router runs with a configuration reload every 10 seconds, so updating the provided config "on the fly" should work. Read more