Skip to content

Try to autodetect matching QoS in ros2 topic pub/echo #594

@nnmm

Description

@nnmm

Feature 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 vs pub2, 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?
  • 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

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is needed

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions