multicastdata-distribution-serviceros2unicast

DDS configuration with multicast and unicast


I am still trying to understand DDS and its concepts. I have a configuration where 2 laptops run dds based application. My environment does not permit multicast so I decided to go for peer to peer connection(unicast). To bring both the laptops in the same network, I connected them using ethernet cable (Not sure if it was necessary or not).

Now I did not change anything in the QoS i.e. i did not do any settings for unicasting. But now my applications are communicating with each other.

Question :

  1. How are the participants being discovered ? Multicasting ? as I did not do any settings for unicasting.
  2. Was it necessary to bring them under one network i.e. connect with ethernet cable if I wanted to use unicasting ?

EDIT :

Configuration is as follows :


Solution

  • How are the participants being discovered ? Multicasting ? as I did not do any settings for unicasting.

    It is not possible for me to answer this question with complete certainty since you are using DDS as part of the ROS2 framework and I am not familiar with the exact details of how the two are set up to interact together. Having said that, from your description it does seem that the participants are indeed using multicast to discover each other.

    The best way to get a conclusive answer is by sniffing the network -- assuming that you have the required privileges to do so. For example you can use Wireshark , which comes with an RTPS dissector that allows you to filter on RTPS messages. (RTPS is the name of the standardized DDS wire protocol.) Check out the destination address and see if you detect any addresses in the multicast range. You can do this while firing up a single DDS-based application. It will start announcing itself over the network immediately.

    Was it necessary to bring them under one network i.e. connect with ethernet cable if I wanted to use unicasting ?

    If you want to use unicasting, you will need to know IP addresses or host names of all peer nodes. As long as those peer nodes can reach each other over UDP, you are good to go. Often, but not always, ping will let you know whether this is the case. Firewalls are a typical cause of problems.

    However, be aware that different types of network have their own specific properties that you might have to adjust your configuration to. Over WiFi for example, the likelihood of packets being dropped (especially with bursts of data) is much larger than when connecting nodes directly with a wire. DDS allows for tuning its protocol to deal with that.