Try to autodetect matching QoS in `ros2 topic pub/echo`
See original GitHub issueFeature request
It could be a great usability improvement if ros2 topic echo
would make an effort to use a matching subscription QoS, and similarly for pub
. For a previous discussion, see #156. The basic idea would be (talking about echo
but the same applies to pub
):
- When all publishers have the same/similar enough QoS, it could be possible to find a matching QoS profile and use that.
- When there are multiple QoS, the user has to make a choice.
- This should probably work in combination with the
--qos
flags, which would fix the specified parameters and let the others be deduced - It should be made the default behavior, if there are no big downsides
But that only talks about a single point in time, whereas for a long-running echo
command publishers can come and go. That raises the questions:
- Should the subscription “recalculate” its QoS when a new subscription/publisher on the other side joins? That would mean checking that there is a QoS that’s consistent with the publishers and if that is not the current QoS, applying that to itself.
- If the answer is “no”, note that it would be very unintuitive to get different output when you run two publishers, depending on which one started first (
pub1
,echo
,pub2
vspub2
,echo
,pub1
). If I understand correctly, there are warnings about this now, which help somewhat. - If the answer is “yes”, should it prompt the user when there is no consistent QoS, or just exit with a message?
- If the answer is “no”, note that it would be very unintuitive to get different output when you run two publishers, depending on which one started first (
- What should the QoS be when there is nothing to match with yet?
- This is related to the previous question: If the QoS is recalculated, that “default” QoS profile is meaningless anyway
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (7 by maintainers)
Top Results From Across the Web
About Quality of Service settings — ROS 2 Documentation
ROS 2 offers a rich variety of Quality of Service (QoS) policies that allow you to tune communication between nodes. With the right...
Read more >External configurability of QoS policies. - ROS 2 Design
This perfectly matches the goal of the proposal of not making QoS settings reconfigurable during runtime. Note: parameter overrides can be constructed ...
Read more >Untitled
Pubeco leclerc pau, Kupiti dresovi nogometnih klubova, Himno evangelico ... chubb lips, Try not to laugh 1 hour vine, Where do real new...
Read more >Untitled
American historical debate topics, Ecommerce facts and figures, ... Aldersley road wolverhampton for sale, Barcelona real madrid full match, Watch sweeney ...
Read more >Quality of Service (QoS) in ROS2 - YouTube
Quality of Service ( QoS ) is one of the most important new settings introduced for ROS2. They give you control over and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think it should handle any possible combination of QoS policies. I.e. we shouldn’t limit ourselves to the preset profiles as users are free to create custom profiles.
I think that sounds reasonable.
Maybe we don’t have to detect when a new publisher joins exactly, rather we can detect when there’s a new publisher with an incompatible QoS. There is a callback API that can let us know when a new incompatible publisher is detected (see this example).
Another case to consider is when publishers drop from the graph. It’s possible that if a publisher is gone, then the echo tool would be able to opt for a stricter QoS policy. E.g. consider the following:
Of course we still have a similar problem of detecting when there is a change to the ROS graph. I think we can get notified that something in the graph has changed, but are not told what changed. So, we’d have to query the state of the graph whenever something changes, and re-evaluated the QoS settings. I’m not sure how expensive this would be. On top of this, I think a graph listener API is only currently available in rclcpp (there’s no Python equivalent).
I would say that as a first step, we could query all publishers at startup and pick QoS based on that; be a strict as possible while maintaining compatibility. Then, any time we get an “incompatible QoS” event, re-calculate the QoS of the subscription. Listening to graph events to detect dropped publishers is probably best to implement separately as I think it is a bit more involved.
The
pub
verb was resolved in https://github.com/ros2/ros2cli/pull/653