ROS2: How to confirm that a DEFAULT_FASTRTPS_PROFILES.xml have been loaded and are used?
I start my ros2 (bouncy) node with a LTEDEFAULTFASTRTPS_PROFILES.xml file that specifies a list of participant IP numbers.
My question is how can I confirm that the file is loaded? Is there a log file? And if it is loaded how can I confirm that my list of peers are the ones actually used? Is there a command to list the set of possible peers/participants?
Asked by tompe17 on 2018-10-03 09:42:08 UTC
Answers
The XML file should be named DEFAULT_FASTRTPS_PROFILES.xml
(drop LTE_
from the front) and it must be located in the pwd
directory where you ros2 run
your application. Example file:
<?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.111</address>
</locator>
</initialPeersList>
</builtin>
</rtps>
</participant>
</profiles>
In one terminal run sudo tcpdump -v | grep "192.168.100.111"
, and in a second terminal (in the same directory) start a ros2 node, e.g. ros2 run demo_nodes_cpp talker
. At minimum, you should see an ARP request like this:
14:09:06.148381 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.111 tell 192.168.100.182, length 28
To convince yourself that DEFAULT_FASTRTPS_PROFILES.xml
is being loaded, changed the IP address to a non-existent host and confirm the ARP request.
Asked by rgreid on 2018-12-12 05:27:18 UTC
Comments