Open imontesino opened 9 months ago
We are having issues with this as well. In our particular case we are making subscriptions from roslibjs. When the subscription is made from roslibjs before the rosbridge_server process sees the associated publisher, we end up with this QoS mismatch compatibility issue.
I haven't begun looking into the technical side at all yet, but conceptually I was thinking along the lines of 2 possible solutions: 1) Add some sort of flag or paramter on the rosbridge_server to tell it to only create subscriptions/publishers lazily once it has seen another participant from which it can gleam the QoS (to keep this simple it would only do this the first time, and would not destroy or recreate those objects if the other side goes away and comes back, although it could be extended to do that in the future). 2) Add explicit QoS settings to roslibjs as well as rosbridge_server. This one seems seems more complicated being as it would probably impact multiple projects... i haven't looked into the technical feasibility of this at all. (seems related: https://github.com/RobotWebTools/rosbridge_suite/issues/887)
Are there any other options that I may be overlooking? I would appreciate any leading guidance that anyone has to offer before we jump right into this.
Seems there has been a lot of talk about this subject over the past few years, as well as some attempts to fix it.
This seems to be a duplicate: https://github.com/RobotWebTools/rosbridge_suite/issues/769
@JayHerpin I agree with the solutions you have outlined
To me, the ideal solution seems like 2, but this comes with significant code changes...
Description
In our setup multiple nodes publish ti a topic
events
of typestd_msgs/String
, all of them with durabilityVOLATILE
. Using roslibjs we create a topic object:When calling
The following warning is printed:
This appears to be caused when creating a publisher first and then a subscription, the publisher is always created as transient local and the subscription inherits that property.
https://github.com/RobotWebTools/rosbridge_suite/blob/77d48c0876dd22d65bd1fab2b440d9d28350d5cc/rosbridge_library/src/rosbridge_library/internal/publishers.py#L105-L109
https://github.com/RobotWebTools/rosbridge_suite/blob/77d48c0876dd22d65bd1fab2b440d9d28350d5cc/rosbridge_library/src/rosbridge_library/internal/subscribers.py#L118-L122
Steps To Reproduce
volatile pub sub
default roslibjs
Then create three terminals and run in the following order:
Expected Behavior
The publisher
QoS
should match the ones of the already existingQoS
for a topic or should be able to be changed via the client. In addition subscriptionQoS
should also be able to be specifiedActual Behavior
A subscriber with incompatible
QoS
is created