qualityOfService QML Value Type
ROS 2 Quality of Service settings for a publisher or subscriber. More...
| Import Statement: | import QtRos2.Core |
| Status: | Experimental Extension |
Properties
- durability : enumeration
- history : enumeration
- liveliness : enumeration
- queueSize : int
- reliability : enumeration
Detailed Description
Holds the QoS policies (reliability, durability, history, liveliness and the queueSize / depth) applied to an Entity's qos property. Policy values are the enums on QualityOfService, e.g.
SomeSubscriber {
qos.reliability: QualityOfService.ReliabilityBestEffort
qos.durability: QualityOfService.DurabilityTransientLocal
qos.queueSize: 5
}For common cases prefer a ready-made profile from QualityOfService: qos: QualityOfService.sensorData().
Note: This is unrelated to qoSProfile from QtRos2.RosgraphMsgs, which is the rosgraph_msgs/QoSProfile introspection message.
See also QualityOfService.
Property Documentation
durability : enumeration
Whether the middleware keeps samples for subscribers that join late.
| Constant | Description |
|---|---|
QualityOfService.DurabilitySystemDefault | Leave the policy to the RMW implementation. This is the default. |
QualityOfService.DurabilityVolatile | Deliver only to subscribers that are already connected. |
QualityOfService.DurabilityTransientLocal | Keep the last queueSize samples so a late subscriber still receives them: how latched topics such as /tf_static work. |
QualityOfService.DurabilityBestAvailable | Request the strongest policy that still matches every endpoint discovered so far. |
history : enumeration
How many samples the middleware buffers.
| Constant | Description |
|---|---|
QualityOfService.HistorySystemDefault | Leave the policy to the RMW implementation. This is the default. |
QualityOfService.HistoryKeepLast | Buffer at most queueSize samples, discarding the oldest. |
QualityOfService.HistoryKeepAll | Buffer every sample, up to the middleware's resource limits. queueSize is ignored. |
liveliness : enumeration
How an endpoint reports that it is still alive. A publisher and a subscriber match only if the publisher's policy is at least as strict as the subscriber's, ordered Automatic, then ManualByTopic.
| Constant | Description |
|---|---|
QualityOfService.LivelinessSystemDefault | Leave the policy to the RMW implementation. This is the default. |
QualityOfService.LivelinessAutomatic | The middleware asserts liveliness on the application's behalf for as long as the process is running. |
QualityOfService.LivelinessManualByTopic | The publisher asserts its own liveliness per topic. Note that this module exposes no lease duration and no way to assert liveliness, so in practice this only affects which endpoints match. |
QualityOfService.LivelinessBestAvailable | Request the strongest policy that still matches every endpoint discovered so far. Note: ROS 2 also had a |
queueSize : int
The depth of the message queue, used when history is QualityOfService.HistoryKeepLast. The default is 10.
reliability : enumeration
How hard the middleware works to deliver every sample.
| Constant | Description |
|---|---|
QualityOfService.ReliabilitySystemDefault | Leave the policy to the RMW implementation. This is the default. |
QualityOfService.ReliabilityReliable | Retransmit until every sample has been acknowledged. |
QualityOfService.ReliabilityBestEffort | Send once and drop samples under load: the right choice for high-rate sensor streams where the newest sample matters most. |
QualityOfService.ReliabilityBestAvailable | Request the strongest policy that still matches every endpoint discovered so far. |
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.