Setting up the RTI DDS configuration file in ROS2

6 posts / 0 new
Last post
Offline
Last seen: 5 years 6 months ago
Joined: 07/23/2018
Posts: 20
Setting up the RTI DDS configuration file in ROS2

I am interfacing ROS2 with native RTI DDS using xml app creation i.e. means all the QoS settings are in this xml file.

Now, for the native DDS application, I can set this .xml file but how can I set a similar sort of a configuration file for a ROS2 based function 

gianpiero's picture
Offline
Last seen: 2 months 1 week ago
Joined: 06/02/2010
Posts: 177

Hello,

I am not a ROS expert, but if they are using Connext DDS you should be able to use one of the method explained here

For example, you can set an environment variable (NDDS_QOS_PROFILES) pointing to your xml file.

Best,
  Gianpiero

ruffsl's picture
Offline
Last seen: 3 years 1 week ago
Joined: 08/07/2017
Posts: 5

Hello Gianpiero,


Not to hijack the thread, but I have a very similar question in passing the QoS setting correctly to enable logging of DDS events. Eventually, I’d like to also enable logging of DDS Security events, e.g. record to disk the log statements from RTI Connext Security SDK. After that I’d also like to use the distributed logger features to publishes those security event logs over the wire for debugging purposes. But, one step at a time, I’d like to get the basic logging QoS settings working with ROS2, as per this question here:

Setting QoS with ROS2 using rmw_connext_cpp  

https://answers.ros.org/question/303016/setting-qos-with-ros2-using-rmw_connext_cpp/  

I read the "How to Load XML-Specified QoS Settings" docs that sugest what you wrote, but am not sure my QoS settings are taking effect as I never see a logs when using the methods from "Useful tools to debug DDS issues".

Feel free to reply in thread (I can update the linked answers.ros.org from your reply if need be)

gianpiero's picture
Offline
Last seen: 2 months 1 week ago
Joined: 06/02/2010
Posts: 177

Hello ruffsl, 

A simple way to verify that your XML file is being loaded by DDS is to put an error in it (for example do not close an open tag). If the file is loaded you should get a big error printed on your console. 

If that happen then your file is being loaded. So the question remains: why the logging QoS are not being used... I would have to debug to figure that out, but one thing that comes to mind by looking at your xml content is that you are not saying that the profile should be the default one. 

So DDS may load it, but not use it. Could you try to add is_default_qos="true" and see if it works.

 

<qos_library name="UserQosProfilesLibrary">
 <qos_profile name="rmw_qos_profile_system_default" is_default_qos="true">
 <participant_factory_qos>
 <logging>
 <verbosity>ALL</verbosity>
 <category>ALL</category>
 <print_format>TIMESTAMPED</print_format>
 <output_file>/tmp/log.xml</output_file>
 </logging>
 </participant_factory_qos>
 </qos_profile>
 </qos_library>

 

 Thanks,
   Gianpiero

 

 

ruffsl's picture
Offline
Last seen: 3 years 1 week ago
Joined: 08/07/2017
Posts: 5

> A simple way to verify that your XML file is being loaded by DDS is to put an error in it (for example do not close an open tag). If the file is loaded you should get a big error printed on your console.

Well oddly enough, if I comment out or remove all the closing xml tags in /opt/rti.com/rti_connext_dds-5.3.1/resource/xml/NDDS_QOS_PROFILES.xml, I still don't see any error or warning print to disk. Though I know I'm using rmw_connext_cpp given I see my "RTI Data Distribution Service ..." Licencing print message just before the ROS2 node starts printing to stdout as well. Also, I made sure I'm only sourcing /opt/rti.com/rti_connext_dds-5.3.1/resource/scripts/rtisetenv_x64Linux3gcc5.4.0.bash

Not even the rtishapesdemo or the HelloWorld_publisher/subscriber RTI examples print any errors about the invalid QoS xml file.

gianpiero's picture
Offline
Last seen: 2 months 1 week ago
Joined: 06/02/2010
Posts: 177

did you set the environment variable NDDS_QOS_PROFILES to point to the 'broken' xml file?

if yes: are we sure that the env variable is passed to the ros application> Sometimes a shell will open another shell and the variable are lost.