ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

ROS 2 Topic on different ROS DOMAINS

asked 2020-05-02 07:40:09 -0600

anonymous user


Hey guys,

I want to create a system where two robots are in different ROS_DOMAINS (one has ROS_DOMAIN_ID=1 and the other one has ROS_DOMAIN_ID=2 for example) and publish/subscribe to the same topic. Meaning that if Robot 1 publishes something to the topic, Robot 2 will be able to listen to it. Is this possible to do? And if so, how can I do it?

I am using ROS Eloquent with Python on Ubuntu 18.

edit retag flag offensive close merge delete


What is the reason for separating the robots by ROS_DOMAIN_ID? Is it not easier to just name_space the robots and have them in the same domain?

MCornelis gravatar image MCornelis  ( 2020-05-04 04:38:32 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2020-05-04 12:30:35 -0600

tfoote gravatar image

The point of ROS_DOMAIN_ID is to isolate systems and prevent cross talk. If you want systems that will talk on some topics but not others you should use different namespaces and remap select topics to match.

There are ways to write a bridging node that is active on two ROS_DOMAIN_IDs but that's very technical and only recommended for very advanced users with very specific use cases.

edit flag offensive delete link more

answered 2022-04-20 10:10:43 -0600

This might help you. domain_bridge

edit flag offensive delete link more

Question Tools



Asked: 2020-05-02 07:40:09 -0600

Seen: 1,108 times

Last updated: Apr 20 '22