Robotics StackExchange | Archived questions

ROS2: set reliability qos from XML profile

Hi, I'm trying to set some QoS settings for a node from an XML profile

I'm using FastRTPS and ROS2 Crystal.

This is my DEFAULT_FASTRTPS_PROFILES.xml file

<?xml version="1.0" encoding="UTF-8" ?>
<dds>
    <profiles>
        <publisher profile_name="test_publisher_profile" is_default_profile="true">
            <qos>
                <reliability>
                    <kind>BEST_EFFORT</kind>
                </reliability>
            </qos>
        </publisher>
    </profiles>
</dds>

The file is correctly parsed, but the reliability setting is ignored.

I tested it using the minimal publisher and subscriber examples. The publisher should be in best effort mode, while the subscriber by default should be reliable. However they are communicating, that's why I'm saying that the XML is being ignored.

I tried with and without the environment variable RMW_FASTRTPS_USE_QOS_FROM_XML

I was looking at the rmw_fastrtps implementation and it looks like the value of that environment variable is only used for some specific qos options, not for all of them.

Is this the case? Is there a way for setting "standard" qos options (reliability, queue depth, volatility) from the XML profile?

Asked by alsora on 2019-02-25 11:54:48 UTC

Comments

Answers

Amazingly, this is still relevant in foxy. This XML is correctly formatted and perfectly functional.

Unfortunately, most nodes don't use the system default QoS so this is going to have very limited effect. If you want to be able to change QoS via the DDS default, they need to set their QoS using

rclcpp::SystemDefaultsQoS()

expanded example and further discussion: https://discourse.ros.org/t/about-qos-of-images/18744/16?u=brettrd

Asked by BrettRD on 2021-02-01 22:28:18 UTC

Comments