rules that control how messages are delivered between publishers and subscribers
In ROS 2, because it’s built on DDS (Data Distribution Service), every topic has tunable QoS settings.
These settings make a huge difference for things like:
reliability=QoSReliabilityPolicy.BEST_EFFORT
BEST_EFFORT → “Send it fast; if some packets get lost, it’s okay.”RELIABLE → “Make sure every message arrives, even if it needs retransmission.”BEST_EFFORT is used for high-frequency topics (e.g., sensor streams, pose updates) where fresh data matters more than perfect delivery.
Example: flight control loops running at 10–50 Hz.
If one packet drops, the next one will arrive soon.
RELIABLE would be slower because it resends lost packets.
durability=QoSDurabilityPolicy.TRANSIENT_LOCAL # or VOLATILE
| Policy | Meaning |
|---|---|
VOLATILE |
Messages exist only while the publisher and subscriber are both alive. When a new subscriber joins, it doesn’t get past messages. |
TRANSIENT_LOCAL |
The publisher keeps the last message in memory, and when a new subscriber joins, it immediately sends that stored message. |