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" ?> <profiles> <participant profile_name="participant_profile" is_default_profile="true"> <rtps> <builtin> <metatrafficUnicastLocatorList> <locator/> </metatrafficUnicastLocatorList> <initialPeersList> <locator> <address>192.168.1.8</address> </locator> <locator> <address>192.168.1.10</address> </locator> </initialPeersList> </builtin> </rtps> </participant> </profiles>
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