Issue: Cannot echo "depthai-ros in Docker mobile_publisher" topics in different Docker container
I have four ROS Humble environments running:
- Create3 robot running ROS 2 Humble (fw H.2.4, FastDDS)
- Desktop Ubuntu 22.04 ROS 2 Humble (FastDDS)
- Docker container "ROS 2 Humble Desktop Plus" running robot control "Wali" node (FastDDS)
- Docker container "luxonis/depthai-ros:humble-latest" running mobile_publisher
(also tried RMW_IMPLEMENTATION=rmw_fastrtps_cpp export added after starting container)
See topics from robot (#1): All
See topics from controller (#3): All
See topics from mobile_publisher(#4): All (ros2 topic list shows /color/mobilenet_detections )
Echo/subscribe to topics from mobile_publisher(#4):
- #1 Robot and
- #2 Desktop,
but Not #3 Other Docker Container (ros2 topic echo /color/mobilenet_detections - nothing)
The two docker containers are both on the same host (Raspberry Pi5).
The two docker containers are both started with "--net host"
The luxonis depthai-ros container start:
#!/bin/bash
docker run -it \
-v /dev/:/dev/ \
-v /home/pi:/home/pi \
-e TZ=America/New_York \
-w /home/pi/wali_pi5/systests/Oak-D-Lite/dockerized \
--net=host \
--privileged \
luxonis/depthai-ros:humble-latest bash
The controller container start:
docker run -dit --name r2hdp --net=host \
-v /dev/snd:/dev/snd \
-v /home/pi:/home/pi -v /dev/input:/dev/input \
-v /dev/bus/usb:/dev/bus/usb \
-e TZ=America/New_York \
-w /home/pi/wali_pi5/c3ws --privileged r2hdp
pi@WaLiPi5:~/wali_pi5/c3ws $ ros2 topic echo /color/mobilenet_detections
(nothing)
ubuntu@WALIDESK:~/wali_desk/c3ws$ cmds/echo_mobilenet_detections.sh
** detections:
class_id='3', score=0.9951171875
** detections:
class_id='3', score=0.994140625