problem:
- Cannot communicate from ROS2 Jazzy on raspberry pi to ROS2 Jazzy on docker container on MacOS
Host
- MacOS Version: 15.1
- Container Image:
arm64v8/ros:jazzy
- Docker Version: 4.34.3
- Docker Host Networking: Enabled
- Docker Subnet: 192.168.65.0/24
- Ping from Raspberry Pi: Successful
Robot
- OS: Ubuntu 24.04.1 LTS
- Ping from Mac: Successful
- IP Address: 192.168.2.9
Docker Run Command
docker run -it --rm \
--network host \
--pid=host \
--ipc=host \
--entrypoint \
/bin/bash \
my_jazzy
DDS Server init
rover@rover-pi:~/Fast-DDS/build$ fastdds discovery --server-id 0
### Server is running ###
Participant Type: SERVER
Security: NO
Server ID: 0
Server GUID prefix: 44.53.00.5f.45.50.52.4f.53.49.4d.41
Server Addresses: UDPv4:[0.0.0.0]:11811
env var pi
rover@rover-pi:~$ env | grep ROS_
ROS_VERSION=2
ROS_PYTHON_VERSION=3
ROS_AUTOMATIC_DISCOVERY_RANGE=SUBNET
ROS_DISTRO=jazzy
ROS_DISCOVERY_SERVER=192.168.2.9:11811
env var mac
dev@docker-desktop:~$ env | grep ROS_
ROS_VERSION=2
ROS_PYTHON_VERSION=3
ROS_DOMAIN_ID=1
ROS_AUTOMATIC_DISCOVERY_RANGE=SUBNET
ROS_DISTRO=jazzy
ROS_DISCOVERY_SERVER=192.168.2.9:11811
cammands tried:
pi
ros2 run demo_nodes_cpp talker --ros-args --remap __node:=talker_discovery_server
ros2 run demo_nodes_cpp talker
mac
ros2 run demo_nodes_cpp listener --ros-args --remap __node:=listener_discovery_server
ros2 run demo_nodes_py listener
ROS_DOMAIN_ID
on raspberry pi? $\endgroup$RMW_IMPLEMENTATION=rmw_fastrtps_cpp
on both host & pi didn't work either $\endgroup$ROS_STATIC_IP
link. $\endgroup$ROS_STATIC_PEERS
either. Tey do not communicate in subnet $\endgroup$