Connecting Cyclone DDS and Fast DDS powered ROS 2 nodes over DDS Router:
docker compose up
This setup works fine:
services:
talker:
build: .
environment:
- ROS_DOMAIN_ID=1
command: ros2 run demo_nodes_cpp talker
ros2router:
image: husarnet/ros2router:1.9.0 # we have different versioning and we're using DDS Router v2.1.0 inisde this docker image
volumes:
- ./config.yaml:/config.yaml
environment:
- PARTICIPANTS= # by keeping this env empty, we're bypassing auto-configuring the DDS Router, and we're using the config.yaml file
command: ddsrouter -c /config.yaml
listener:
build: .
environment:
- ROS_DOMAIN_ID=2
command: ros2 run demo_nodes_cpp listener
This setup fails (no talker-listener communication):
services:
talker:
build: .
environment:
- ROS_DOMAIN_ID=1
command: ros2 run demo_nodes_cpp talker
ros2router:
image: husarnet/ros2router:1.9.0 # we have different versioning and we're using DDS Router v2.1.0 inisde this docker image
volumes:
- ./config.yaml:/config.yaml
environment:
- PARTICIPANTS= # by keeping this env empty, we're bypassing auto-configuring the DDS Router, and we're using the config.yaml file
command: ddsrouter -c /config.yaml
listener:
build: .
environment:
- RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
- ROS_DOMAIN_ID=2
command: ros2 run demo_nodes_cpp listener