-
Notifications
You must be signed in to change notification settings - Fork 27
Conversation
Thanks for tracking down this bug. According to the documentation, Connext already uses the same QoS settings: In any case, I think these settings should go in the services QoS profile: https://github.com/ros2/rmw/blob/master/rmw/include/rmw/qos_profiles.h#L46 so we have a centralized place to document/track them. I also imagine that in the future, there may be cases where users want different QoS settings for services (e.g. over lossy links). |
Got it. It looks like the rmw_qos_profile_services_default struct isn't On Thu, Sep 10, 2015 at 9:19 AM, Esteve Fernandez notifications@github.com
|
@jacquelinekay my bad, I thought it was being used. Anyway, yeah, it'd be great if you could reuse it. Thanks! |
The note about Connext is interesting. On rmw_connext/master, I see the services bug (ros2/rmw_connext/#96), and it appears fixed on the fix_service_qos branch, in which the only change is the QoS settings for the topic, DataReader, and DataWriter for the requester and the responder. I think the link you posted refers to the default QoS settings for the RequestReply Example Module. It took some digging in the API reference, but it appears that the default History QoS policy for DataReaders and DataWriters is KEEP_LAST: and, "The default (and most common setting) for depth is 1, indicating that only the most recent value should be delivered." |
I think for services, keeping only one message on the history, instead of the entire history, makes sense. The current QoS profiles in |
Alright. It seems like the root of the problem is that the default reliability setting for DataReaders is BEST_EFFORT. I'm guessing that the bug originates because the first request from the client does not get read because the DataReader on the server side does not try to re-read the missed request. The reliability needs to be set to RELIABLE for the server to respond to a client that started up before the server did. I just tried this branch with We can make a PR to rmw setting the default QoS profile for services to |
@jacquelinekay sounds like a plan. |
64b6148
to
c97ade7
Compare
Should we refactoring this PR similar to Connext to move the qos stuff into a function instead of duplicating the code N times? And also check if the logic can be done in rmw instead of the rosidl type support? |
Done. Because the Publisher and Subscriber for the requester/responder are private in the headers defined in the type support library, I use the macro |
+1 |
…and share code for setting DataReader/Writer QoS.
57cf53c
to
7730b49
Compare
Fix default QoS settings for services
Connects to ros2/rmw_connext#96
This fixes the issue @esteve and @dirk-thomas have observed where the
add_two_ints
client does not receive the response from the server unless it was started after the server was initialized. You may still see a few seconds between when the server is initialized and when the client receives the message, but the client should receive the response eventually.I'm willing to wait on the service tests to be stable before others review. Otherwise you can use the
add_two_ints
example to test it.Eventually we should consider if we want to expose QoS options for services, but I think this is better default behavior for now.
Connext PR: ros2/rmw_connext/pull/100