Skip to content

Separate communication channels for multi robot setup (one local per robot, and one global between robots) #498

@Tuntenfisch

Description

@Tuntenfisch

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: any

My 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:

  1. Is the split between global and local topics as I've described advisable?
  2. Does DDS router make sense for this approach?
  3. Are there other, easier alternatives to achieve the same thing?
  4. 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?
  5. With the above config, I cannot use remove-unused-entities: true because it is incompatible with discovery-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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions