Quality of Service and DDS
ROS 2 runs on DDS, a communication standard that lets each publisher and subscriber choose quality of service settings. Reliable delivery resends lost messages, at the cost of delay. Best effort just sends and moves on. Durability decides whether a subscriber that joins late gets the last messages it missed, which matters for things published once, like a map.
The main QoS settings
Reliability: best effort or reliable. History and depth: how many messages to keep. Durability: volatile, where late joiners get nothing old, or transient local, where the publisher keeps the last messages and hands them to new subscribers. Deadline and liveliness catch publishers that stop sending. With loss probability \(p\), reliable delivery takes on average
attempts per message, each retry adding delay.
What to notice
With best effort, lost messages are simply gone, but those that arrive are fresh. That suits sensor streams, where the next scan replaces the last. Reliable delivery gets every message through, but on a bad link some arrive late, which suits commands and events. A late joiner with volatile durability sees nothing until the next message, while transient local hands it the most recent one at once, which is how a map server makes sure new nodes get the map. Publisher and subscriber settings must be compatible, or ROS 2 silently does not connect them, a common source of "why am I not receiving anything?"