ROS2's SystemDefaultsQoS() breaks portability across RMW implementations
FastDDS supports XML overrides, but CycloneDDS and Zenoh don't – causing silent behavior differences.
A ROS2 developer recently highlighted a critical inconsistency in how the SYSTEM_DEFAULT QoS policy is resolved across different RMW (ROS Middleware) implementations. When a node uses SystemDefaultsQoS() – the recommended way to write portable, externally-configurable nodes – the actual QoS applied depends entirely on which middleware is underneath. FastDDS lives up to the promise: it supports full XML-based QoS overrides via the FASTDDS_DEFAULT_PROFILES_FILE environment variable combined with RMW_FASTRTPS_USE_QOS_FROM_XML=1. But the other major implementations fall short. CycloneDDS's CYCLONEDDS_URI only controls participant-level settings like network threads, not endpoint-level QoS policies (reliability, durability, depth). Zenoh's rmw_zenoh lacks both an external configuration mechanism for endpoint QoS defaults and a complete implementation of RELIABLE+VOLATILE+KEEP_LAST (tracked in issue #457). The result: the same node code behaves differently on each RMW, defeating the purpose of abstraction.
The root cause lies in the static definition of all predefined QoS profiles (e.g., SensorDataQoS, ParametersQoS, ServicesQoS) as hardcoded constants in rmw/qos_profiles.h. The only escape hatch is SystemDefaultsQoS(), but its resolution is RMW-specific and undocumented as a standard contract. The proposal calls for a minimal standardized mechanism at the rcl or rmw interface level. Options include a well-defined environment variable like RCL_DEFAULT_QOS_PROFILE pointing to a vendor-neutral YAML config file parsed by rcl, or a formal contract requiring each RMW to document its resolution method. Either approach would make SystemDefaultsQoS() genuinely useful for portability and deployment – especially as more RMWs (Zenoh, Eclipse Cyclone, proprietary) diverge from the DDS XML model. This issue directly impacts ROS2 developers building multi-platform robotics systems where consistent QoS behavior is critical.
- FastDDS supports full XML-based QoS overrides via FASTDDS_DEFAULT_PROFILES_FILE + RMW_FASTRTPS_USE_QOS_FROM_XML=1
- CycloneDDS's CYCLONEDDS_URI only controls participant-level settings, not endpoint QoS (reliability, durability, depth)
- Zenoh rmw_zenoh lacks both external endpoint QoS config and full implementation of RELIABLE+VOLATILE+KEEP_LAST (issue #457)
Why It Matters
Developers can't rely on SystemDefaultsQoS() for portable QoS – nodes silently behave differently across middleware backends.