-
Notifications
You must be signed in to change notification settings - Fork 23
Description
Problem Description:
Currently, the Fast DDS Router, when forwarding topics between different ROS_DOMAIN_IDs (or more generally, DDS domains), creates its internal DDS DataReaders and DataWriters with a default QoS profile that often uses BEST_EFFORT reliability. This occurs regardless of the QoS settings of the original publisher or the ultimate subscriber in the ROS 2 ecosystem.
This default behavior leads to issues when a ROS 2 publisher is publishing with RELIABLE reliability and a ROS 2 subscriber on the other side of the router is also expecting RELIABLE reliability. The router's internal BEST_EFFORT endpoints break the chain of reliability, preventing the ROS 2 subscriber from connecting to the router's BEST_EFFORT publisher.
Example Scenario:
ROS_DOMAIN_ID=1: A ROS 2 node publishes topic/my_topicwithRELIABLEreliability.- Fast DDS Router: Configured to bridge
ROS_DOMAIN_ID=1andROS_DOMAIN_ID=2.- The router creates an internal DDS
DataReaderon domain1for/my_topic.ros2 topic info -vreveals this reader usesBEST_EFFORT. - The router creates an internal DDS
DataWriteron domain2for/my_topic.ros2 topic info -vreveals this writer usesBEST_EFFORT.
- The router creates an internal DDS
ROS_DOMAIN_ID=2: A ROS 2 node subscribes to/my_topicwithRELIABLEreliability.
Outcome: The subscriber on Domain 2 cannot connect to the router's DataWriter on domain 2 because of the QoS mismatch (RELIABLE subscriber vs. BEST_EFFORT publisher).
Current Workaround:
The current workaround is to manually specify the QoS settings (e.g., RELIABLE reliability) for each affected topic in the Fast DDS Router's YAML configuration file.
While this works, it has limitations:
- It requires manual configuration for every topic that needs a specific QoS other than the router's default.
- It's not dynamic. If subscribers with different QoS profiles for the same topic exist, the static configuration might not satisfy all of them optimally (though a
RELIABLErouter publisher can serve bothRELIABLEandBEST_EFFORTsubscribers).
Proposed Feature:
A new mechanism or an enhancement to the existing behavior where the Fast DDS Router can dynamically adjust the QoS of its internal DataReader and DataWriter endpoints to better match the requirements of the actual discovered subscribers.
Desired Behavior:
- When the router discovers a publisher for a topic it intends to forward (e.g.,
/my_topicfrom domain1, published withRELIABLEreliability). - When the router discovers a subscriber for the same topic on a different domain (e.g.,
/my_topicon domain2, subscribing withRELIABLEreliability). - The router should:
- Create its internal
DataReader(on domain1) with a QoS profile that is compatible with both the original publisher's QoS and the requirements of the downstream subscriber(s). Ideally, if the subscriber needsRELIABLE, the router's reader should also attempt to beRELIABLE(assuming the original publisher supports it). - Create its internal
DataWriter(on domain2) with a QoS profile that matches or is compatible with the discovered subscriber's QoS. If the subscriber requestsRELIABLE, the router's writer for that path should also beRELIABLE.
- Create its internal