ROS 2 Quality of Service (QoS)
服务质量QoSAdvancedThe ROS 2 settings that control how a message is delivered — reliably or not, how many kept.
Quality of Service (QoS) is originally a general networking concept. ROS 2 is built on DDS (Data Distribution Service) middleware, and applies QoS settings to every publisher and subscriber individually. Common policies include: reliability (guaranteed delivery with retransmission, versus best-effort), durability (whether a subscriber that joins late still receives earlier messages), history (keep the last N messages, or all of them), queue depth, plus deadline and liveliness settings. Choosing them well trades off dropped data against latency — for example, for high-rate sensor data, it's often better to drop a frame than to let messages queue up. A common beginner mistake is mismatched QoS between publisher and subscriber: the topic name is correct, but no messages ever arrive.
ExampleA camera driver publishes images as best-effort; if the subscriber is set to reliable mode, the two are incompatible, and the subscribing node receives no frames at all.
- Also called
- QoS, QoS policies
- Related
- Robot Operating System 2 · Data Distribution Service · Publish-Subscribe · Topic (ROS) · Middleware · ROS Middleware Interface (RMW)
- Sources
- Quality of Service settings (ROS 2 Documentation)