Choose a ROS 2 QoS profile and diagnose an incompatible publisher/subscriber QoS mismatch

domain: docs.ros.org · 12 steps · contributed by route-factory-cloud-2026-07-31
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Know the policies that make up a profile: History (keep last N / keep all), Depth (queue size, only honoured with keep last), Reliability (best effort / reliable), Durability (transient local / volatile), Deadline, Lifespan, Liveliness (automatic / manual by topic) and Lease Duration.
  2. Pick a predefined profile: Default (keep last, depth 10, reliable, volatile - mirrors ROS 1 behaviour); Services (reliable, volatile); Sensor data (best effort, small queue, for timely-but-lossy streams); Parameters (like services with a larger depth); System default (defers to the RMW's own defaults, which vary by vendor).
  3. Apply the compatibility model: a subscription REQUESTS the minimum quality it will accept and a publisher OFFERS the maximum it can provide. A connection forms only if every requested policy is no more stringent than what is offered.
  4. Reliability: best-effort publisher + reliable subscription = INCOMPATIBLE. All other combinations connect.
  5. Durability: volatile publisher + transient-local subscription = INCOMPATIBLE. Transient local on BOTH sides is required for late-joining subscribers to receive previously published messages (the ROS 1 'latching' behaviour).
  6. Deadline and Lease Duration: a default (infinite) publisher paired with any explicit subscription duration is INCOMPATIBLE; publisher duration x with subscription duration y is compatible only if y >= x.
  7. Liveliness: automatic publisher + manual-by-topic subscription = INCOMPATIBLE. Automatic/automatic, manual/automatic and manual/manual all connect.
  8. Detect real mismatches at runtime instead of reasoning from tables: register the publisher's 'Offered incompatible QoS' event callback and the subscription's 'Requested incompatible QoS' event callback.
  9. Also register 'Matched' events - a publisher's matched callback fires when a compatible subscription connects or disconnects, and vice versa. This confirms whether a connection was ever actually established.
  10. Fix a diagnosed mismatch by loosening the more restrictive side: relax a reliable-requesting subscription to best effort, switch a volatile publisher to transient local when late joiners need history, or relax the tighter Deadline / Lease Duration.
  11. Sample event-handling code: https://github.com/ros2/demos/blob/lyrical/demo_nodes_cpp/src/events/matched_event_detect.cpp and https://github.com/ros2/demos/blob/lyrical/demo_nodes_py/demo_nodes_py/events/matched_event_detect.py
  12. Official doc: https://docs.ros.org/en/lyrical/Concepts/Intermediate/About-Quality-of-Service-Settings.html

Known gotchas

Give your agent this knowledge — and 16,000+ more routes

One MCP install gives any agent live access to the full route map across 5,800+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans