0
$\begingroup$

Rosanswers logo

ROS uses either TCP/ IP or UDP communication protocol. Different ROS nodes can be run on different machines with different network (not same subnet mask) only with one master provided that each machine can communicate bidirectionally.

Now ROS2 uses DDS for communication. In DDS language, different ROS2 nodes can interact with each other only if they belong to the same domain participant i.e. they are in the same network.

Does that mean, that ROS nodes can communicate with each other even if they are in different network whereas ROS2 nodes can only communicate if they are in the same network ?


Originally posted by aks on ROS Answers with karma: 667 on 2018-09-21

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The "domain participant ID" is just a number that allows you to configure a sort of "virtual network" or "virtual overlay" which makes DDS participants that do not use the same number ignore each other, it does not influence the networking component of DDS. See Part 2: Core Concepts > Working with DDS Domains > DomainParticipants > Choosing a Domain ID and Creating Multiple DDS Domains for the RTI explanation of this.

What you are referring to ("only in the same network") is actually due to the fact that in the default configuration many (all?) DDS implementations use (UDP) broadcast traffic for peer discovery.

By default, many routers and gateways are configured to not pass on broadcast traffic from their own network to other networks they are connected to and additionally, the DDS implementation may only broadcast to the local subnet (ie: all IPs in the same range).

But that is not an inherent issue with DDS, nor with ROS2. It's a configuration issue (and many DDS implementations support either discovery with a pre-defined list of participants or a unicast discovery, or even both), and even if the specific middleware doesn't support changing it, there are various networking techniques that can be used to bridge two (or more) network segments in such a way that broadcast traffic is allowed to flow between them.


Originally posted by gvdhoorn with karma: 86574 on 2018-09-21

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by aks on 2018-09-21:
Does that mean, if I use only Unicasting for peer discovery, I cann connect to a compatible DDS participant in any network ?

And that the settings for multicasting can also be configured for the same behaviour?

Comment by gvdhoorn on 2018-09-21:
In theory: yes, that should work.

In practice: internetworking is never easy and can give you interesting problems..

But lots of other techniques can be used as well. There is no need to resort to unicast exclusively.

Comment by aks on 2018-09-21:
Yes, but multicasting is not allowed by most of the Work networks + there is additional overhead of firewalls which could get very tricky.

Comment by gvdhoorn on 2018-09-21:
Note: I wrote broadcast, not multicast. Those are two different things.

If broadcasting is prohibited in a network then a lot of things will stop working.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.