Ask Your Question
0

How can I disable multicasting and enable unicasting in ROS2

asked 2018-08-30 11:33:10 -0500

aks gravatar image

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 ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-09-07 03:02:52 -0500

aks gravatar image

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.

edit flag offensive delete link more
0

answered 2018-08-30 11:42:05 -0500

Dirk Thomas gravatar image

Currently ROS 2 doesn't provide that option. You might want to check for the DDS implementation you are using if it supports that option through a vendor specific configuration file.

edit flag offensive delete link more

Comments

I am using RTI connext. They do support it and that is why I have configured in their native application. What do you mean by vendor specific configuration file ? Could i use it to enable unicasting in ROS2 as well ?

aks gravatar imageaks ( 2018-08-30 11:48:40 -0500 )edit

When you use Connext with ROS 2 the RTI specific configuration files are still being used and applies for publisher / subscribers / topics created by ROS - as long as the configuration value is not explicitly set from the ROS 2 code.

Dirk Thomas gravatar imageDirk Thomas ( 2018-08-30 11:54:00 -0500 )edit

and where can i find these configuration files ?

aks gravatar imageaks ( 2018-08-30 12:16:26 -0500 )edit

I don't know for Connext out of my head. I would suggest checking RTI's documentation.

Dirk Thomas gravatar imageDirk Thomas ( 2018-08-30 13:54:16 -0500 )edit

I meant where in ROS2 can i pace these configuration settings so that a ROS2 node takes into account of these settings.

aks gravatar imageaks ( 2018-09-04 04:45:10 -0500 )edit

There is nothing ROS 2 specific involved. The vendor specific configuration files are being applied independently.

Dirk Thomas gravatar imageDirk Thomas ( 2018-09-04 09:37:21 -0500 )edit

Your Answer

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

Add Answer

Question Tools

3 followers

Stats

Asked: 2018-08-30 11:33:10 -0500

Seen: 304 times

Last updated: Sep 07 '18