[ROS2] Docker node communication
Configuration:
- ROS Distro: Foxy
- OS Version: Ubuntu 20.0 (Docker)
Hello, I am trying to use Docker to run Foxy inside my Ubuntu 22.04 system, I have successfully run the ros:foxy image and managed to establish communication between my host machine and the docker.
I am running a ros package that reads data from a sensor through ethernet and publishes it to a topic, the problem is I must use
--network=host
option in order for my package to reach the sensor IP, but when I do this my ros communication doesn't work anymore, even after setting ROSDOMAINID the same in the host machine and the docker.
Also if I try to use the default network setting for docker I cant reach the IP of my sensor.
What is the correct network setup to have a --network=host and still make ROS communicate?
Asked by Ammar Albakri on 2023-04-10 08:34:04 UTC
Comments