Search code examples
network-programmingsimulinkmulticastdata-distribution-serviceros2

Does DDS communication works between 2 computers in different networks?


I am quite new to DDS. I am using ROS2 which is built on DDS. I want to run a ROS2 based publisher and subscribe to a RTI Connext based Simulink model both located on different PC's.

I want communication between 2 different PC's.

Questions :

  • Should both PC's be located in the same network.
  • Should multicasting be enabled ? Multicasting is blocked in my company's network. Is there an alternative to this ?

Solution

  • Yes, both PC must be under the same network. Multicasting is used for the discovery of the nodes in ROS2.

    If your company does not provide the necessary networking support, you can always try to build your own. For example you can use a switch and connect both PC to it.

    Or you can use your phone. I created a hotspot with my phone with 4 devices connected to it and communicating using ROS2.

    However, if you need to have access to the company network, ask your IT department if they can set you up with a switch connected to the network that has multicast :)

    Edit: As specified in another answer, it is possible to do a static discovery. However, this would imply modifying the ROS2 configuration of the RTI Connext RMW> https://github.com/ros2/rmw_connext