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

How should I choose appropriate QoS policy?

asked 2019-07-17 02:15:06 -0600

xhuan28 gravatar image

I am developing a ROS2 node which subscribes a camera topic and does image processing afterwards. I set the QoS policy as SensorDataQoS whose depth is 5, but I found that the latency was quite long by "ros2 topic delay". The latency is shorten to normal value till I set the queue depth in QoS policy to 1. Does it mean the depth should always been 1 if I want the shortest latency?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-07-24 05:14:22 -0600

MCornelis gravatar image

If you want to know the influence of different QoS settings I would highly recommend checking out the shapes demo provided by most DDS vendors.

This demo can give you a good idea of what certain QoS settings do by playing around with different settings in the GUI.

For an explanation of the different QoS options you could have a look here:

Depending on your use case different QoS settings will apply. For example:

Late-joiners need not receive old data -> use Volatile instead of Transient(-Local)

Communication does not need to be reliable -> use Best Effort instead of Reliable

Only the latest data is relevant -> use history depth of 1 instead of 5

As you mentioned the choice of QoS settings can influence your systems performance by a lot, so it is recommended to familiarize yourself with the meaning of these settings. In most cases the default profiles will give decent results (the choice of QoS settings is quite sensible), but best results are obtained by fitting the QoS settings to your use-case. Given the limited information you provided about your use-case I'm afraid I can not give you a more extensive answer on what QoS settings to choose.

edit flag offensive delete link more


Thanks a lot for your detailed answers. I will choose the best QoS configuration according to the guidance to adapt my scenario.

xhuan28 gravatar image xhuan28  ( 2019-08-07 21:53:54 -0600 )edit

Question Tools



Asked: 2019-07-17 02:15:06 -0600

Seen: 1,547 times

Last updated: Jul 17 '19