ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

ROS2: set reliability qos from XML profile

asked 2019-02-25 10:54:48 -0500

alsora gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-02-01 21:28:18 -0500

BrettRD gravatar image

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...

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2019-02-25 10:54:48 -0500

Seen: 1,178 times

Last updated: Feb 01 '21