ROS2 Discovery Server on Host

I am trying to use ROS2 Humble with FastDDS and Husarnet to bridge computers running ROS2. However, due to requirements to run on the host, I can’t get the discovery server to communicate.

Requirements:

  • Some devices must run outside of a container on the host machine. These communicate over the network
  • I also have to communicate with ROS1 through a ROS1 bridge.

I would like to use RVIZ on my host machine and ROS2 navigation on a robot and wanted to leverage Husarnet to enable this.

Problem:
I set up my docker compose file (similar to this blog post) that launches everything on “host” instead of using husarnet container as a service.

But for some reason all discovery fails in this case. Why does this happen? Is there a solution for running Husarnet VPN and ROS2 while also being on host?

I have also tried installing Husarnet directly on host to no success.

Any help would be appreciated.

Hi @zeerekahmad,

Could you share some code allowing us to reproduce your issue? Basically running containers with network_mode: host in compose.*.yaml file could make a trick.

You can also run Husarnet container in network_mode: host. The setup is a little bit different and is described here: https://husarnet.com/docs/tutorial-docker-image/#husarnet-container-for-vpn-connectivity-for-a-host-os

Best,
Dominik