-
Notifications
You must be signed in to change notification settings - Fork 80
Description
Feature request
Feature description
In the presence of multiple publishers, with potentially different QoS settings, it is useful to automatically setup a subscription with a QoS that is compatible with the majority (if not all) of the publishers. Presumably, what it means for two QoS profiles to be compatible depends on the RMW implementation. Therefore, it makes sense to offer an API that, given one or more endpoints, returns a QoS profile that is compatible with the most endpoints.
Immediately useful in the following tools:
- ros2topic for choosing QoS based on existing publishers/subscriptions (Try to autodetect matching QoS in
ros2 topic pub/echoros2cli#594) - rosbag2 for choosing QoS for recording and playback
- ros1_bridge (for example, Add hardcoded QoS for the /tf_static topic for parameter bridge ros1_bridge#304)
- domain_bridge for bridging multiple publishers on the same topic
Implementation considerations
Given the non-symmetric nature of publisher and subscription QoS policies, it may make sense to add two API's: one for getting a publisher QoS and one for getting a subscription QoS.
There already exists an implementation for DDS RMWs in rosbag2, see related issue about moving logic to a common place: ros2/rosbag2#601
I'm proposing we actually move the logic to the RMW layer, since it may vary depending on the RMW implementation.
Perhaps moving this logic to RMW is overkill, as the existing QoS policies are fairly specific to DDS. Alternatively, we could hard-code the compatibility rules in rcl.