Ask Your Question
0

ROS 2 Topic on different ROS DOMAINS

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

anonymous user

Anonymous

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

Comments

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 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 365 times

Last updated: May 04 '20