Rosanswers logo

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?

Originally posted by xhuan28 on ROS Answers with karma: 31 on 2019-07-17

Post score: 0


1 Answer 1


Rosanswers logo

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.

Originally posted by MCornelis with karma: 331 on 2019-07-24

This answer was ACCEPTED on the original site

Post score: 5

Original comments

Comment by xhuan28 on 2019-08-07:
Thanks a lot for your detailed answers. I will choose the best QoS configuration according to the guidance to adapt my scenario.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.