-
Notifications
You must be signed in to change notification settings - Fork 33
detect participant-local graph changes #168
Comments
more disabled related tests in |
Once this is merged for Connext as well as FastRTPS the conditional checks last updated in ros2/system_tests#145 can be removed. |
Just an update on this. I have a solution that "works". However, there are still spurious failures which I believe occur due to a race condition. The current implementation works by updating the graph data when the user calls any of the create/destroy functions for any of the primitives (sub/pub, service/client). Updating the graph data means the functions like
The assumption is that 8 should happen before 5, which is also the assumption that the "create" or "destroy" functions at the DDS level are synchronous for local pub/sub. I can only guess at the reasons for 8 being delayed without more research. My guess it that there is some asynchronous discovery work that needs to be done even though the topic is local. It seems that this is not a problem with FastRTPS, and the work around is not necessary for OpenSplice because they use the same notification system for local and remote changes to pubs/subs. So, I guess what I need to do is either:
I'm going to pursue the second. There is a way to get a callback when a new endpoint match is made, but it requires a match to exist (would not work for the case where you want to know what pub/sub exist and get notified when that changes but do not want to pub or sub to the topic). In the case of services, you have to have a client already and so this method might be preferable. For the former option, I could see the stance of "this is an anonymous, asynchronous activity and we shouldn't rely on receiving the first message sent (even though it is local)". That kind of sucks, but it's somewhat realistic for a "non-latched" topic. |
Another update. I cannot use the "when the connection is established" event rather than the "create"/"destroy" functions because the tests that are failing now are tests that only use publish and subscribe. In the particular case of the tests I have both a publisher and a subscriber, but in general I cannot use the "when the connection is established" event to increment the local count of publishers or subscribers for a topic. Because it requires that at least one matching peer exists. Basically a publisher that advertises but has no matching subscription (local or remote) would not contribute to the "count publishers" for that topic (locally). So now I have to consider modifying the tests to not only retry spin_some when the callback is not called on the first check, but also to republish the message, in case the original one was sent before actual communications were set up. |
I'm going to go ahead and merge these. I will address additional comments in follow up pr's. |
For reference:
Basically, any newly created DataWriters and DataReaders generate an entry on a "builtin" DDS topic. In OpenSplice you get all notifications, but Connext follows a section of the DDS spec that says locally created (created in the same participant) DataWriters and DataReaders don't generate entries (the specifics are in the above links).
So for us to get notifications of local changes, we'll need to maintain some state ourselves.
Because of this I disabled the
rcl_service_server_is_available
function for Connext and Connext Dynamic:rmw_connext/rmw_connext_dynamic_cpp/src/functions.cpp
Lines 3327 to 3329 in c983a8c
rmw_connext/rmw_connext_dynamic_cpp/src/functions.cpp
Lines 3327 to 3329 in c983a8c
I also disabled the related tests in
rcl
(which should be re-enabled after they're fixed):The text was updated successfully, but these errors were encountered: