ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A

ROS2 and OpenVPN level 2

I am playing around with Bouncy. Will Bouncy work when all computers are connected using OpenVPN level 2. That is broadcast is not supported. I saw somewhere that in DDS if you know the IP numbers of the compuetrs they can be specified in DDS and DDS works. Is this possible to do in ROS2?

If you are using the default ROS2 DDS implementation, then Fast RTPS is able to load a default XML file, and inside this file you can set the default QoS for the ROS2 internal’s DDS participants.

The XML file should be named DEFAULT_FASTRTPS_PROFILES.xml and it must be located in the root directory where you will execute your application.

Here you have an example of XML file. It disables multicast setting an empty metatraffic unicast locator and set two initial peers where other ros2 nodes will be running.

<?xml version="1.0" encoding="UTF-8" ?>
    <participant profile_name="participant_profile" is_default_profile="true">

I hope this is helpful for you.

The talker/listener example actually worked without any modification but your example is still very useful.

I was now looking for how to specify that only one network interface should be used. I have on LTE network and one WiFI network and want to start a ros1 bridge that only used WiFi and one that only uses LTE.

Can I choose which profile to use when starting a ros2 node?

About specify the network interface, current release version of Fast RTPS supports it through code, but not through XML. It is incoming a new feature and it brings the setting this transport’s property though XML.

Currently ROS2 only loads the default profile (which is tagged with is_default_profile="true"). Before starting the ros2 node you might copy the DEFAULT_FASTRTPS_PROFILES.xml file you need.

I start my application with:

`ros2 run ros1_bridge parameter_bridge /topics`

Is the directory were DEFAULT_FASTRTPS_PROFILES.xml are looked for then the directory were I do the ros2 run command? In that case I can just start two parameter_bride programs in different directories.

I will solve my problem now with specifying the IP numbers of possible robots (I assume I can specify numbers that do not exist) and will look forward to the functionality of specifying the interface in the XML file.

I tested a bit and the file in the directory were I run “ros2 run…” is used. Perfect!

I’m glad to heard that.

Is this still the case?
We tried with xml in same directory, even with an invalid xml, but nothing changes…

Ubuntu 18.04, Dashing, FastRTPS

According to

you can also specify the file in an environment variable:

“Using an XML file which location is defined in the environment variable FASTRTPS_DEFAULT_PROFILES_FILE”


sorry to interrupt you digging old thread,

OpenVPN level 2. That is broadcast is not supported.

this is because of OpenVPN? tunnel interface does not accept broadcast? is that what you mean?
i am not specialist here, but i like to use ROS2 communication with software defined network.

if possible, could you enlighten me a little bit about this aspect?


Now when I tried to find the text I readabout this I find things saying that layer 2 VPN can support broadcasting (using bridge mode).

What I know is that using a standard OpenVPN server UDP broadcasting was not working for me. And that is probably because it is not running in bridge mode.

I read about bridge mode and it seemed complicated to setup and not recommended unless you really needed it. But maybe I should look at this again since I still suffer from the limitation of not having UDPbroadcast working…

1 Like

I don’t have too much knowledge about VPN. Only for helping, maybe using a TCP transport could help you. Fast-RTPS supports TCP connections. Documentation here.