-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Hello,
I have a setup of multiple robots, which communicate with each other. Their internal software stack is based on ROS2 Humble. The communication between the robots is also using ROS2 Humble. The middleware used is FastDDS.
Right now, all robots see all other robots topics, i.e. they not only see topics meant for shared communication between robots, but also topics other robots use to make their internal software stack work. This kind of clutters the global communication space.
Ideally, I would want to have ROS2 topics/services that start with "/global/" be shared, and any other topic be local to the individual robot. I tried doing this with DDS router and the following config:
allowlist:
- name: rt/global/*
- name: rq/global/*
- name: rr/global/*
participants:
- name: local
kind: local
domain: 1
discovery: true
- name: global
kind: local
domain: 0
specs:
discovery-trigger: anyMy understanding is that this effectively bridges any topics/services starting with "/global/" between the domain ids "1" and "2". To extend this to an "arbitrary" amount of robots, I would deploy one DDS router with the above config on each robot, making sure each robot operates on a unique domain id, i.e. I would change the "local" participants domain id to something unique for that robot and run any ROS nodes using this unique id, too.
I have a few questions, tho:
- Is the split between global and local topics as I've described advisable?
- Does DDS router make sense for this approach?
- Are there other, easier alternatives to achieve the same thing?
- I don't see any easy way to automatically assign unique domain ids to robots. Of course, I can manually specify ids on each robot's system but my software stack is containerized and I would like to automate as much as possible. Any recommendations?
- With the above config, I cannot use
remove-unused-entities: truebecause it is incompatible withdiscovery-trigger: any. Ideally I would like to have unused entities removed but then the DDS router doesn't bridge any topic unless someone on the domain where the topic is published also subscribes to it first. I suppose there is no workaround for this?