0
$\begingroup$

Rosanswers logo

I am integrating ROS2 with another native DDS based application, both located on different laptops but in the same network. My problem is that I cannot use multicasting due to certain limitations. So, I opted for unicasting for the discovery process. I configured the native DDS based application as unicast as explained here. But my ROS2 based machine still uses multicasting. It is obvious that once I find the ROS2 based machine through unicasting, both discover each other and the communication works in both direction. But how can i configure ROS2 to use unicasting ?


Originally posted by aks on ROS Answers with karma: 667 on 2018-08-30

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

There are not many QoS settings made in the ROS2 RMW code; the Connext libs will look for a source of user QoS settings using the normal search order (detailed here) - meaning you can provide your own QoS settings to the Connext libs under ROS2, using a variety of methods. Here's what I did:

To disable multicast in ROS2, create a file named "NDDS_DISCOVERY_PEERS" in a directory from which your ROS2 application(s) will be launched (directory where the ros2 command is entered and run). Place in this file a list of the initial peers for discovery (make sure to exclude multicast and shmem) format as detailed here.
My file had: localhost,192.168.1.44 For other QoS settings, place in the same directory as above a "USER_QOS_PROFILES.xml" file containing the QoS settings you'd like to use in ROS2. These settings will affect the ROS2 applications launched from that directory.

this is the answer i received from a RTI colleague.


Originally posted by aks with karma: 667 on 2018-09-07

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by machinekoder on 2019-08-26:
That's a good answer. I just would like to add that this answer is Connext DDS specific. Changing this setting for eProsima fastrtps works different by creating a DEFAULT_FASTRTPS_PROFILES.xml with an initialPeersList.

$\endgroup$

Your Answer

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