RouteServiceCli: create DDS Reader/Writer only if a remote Server is announced (fix #62) #63
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix #62.
The route for a Service Client (
RouteServiceCli
) was creating a DDS Reader for requests and a DDS Writer for reply as soon as created, following the discovery of a ROS Service Client over DDS. This lead the Service Client to think a Server was existing, but it wasn't! The Client was sending the request to the bridge that routed it as a query going nowhere, and thus no reply ever came to the Client that kept hanging.This PR fixes this making sure the route is activated (i.e. DDS Reader/Writer created) only when a remote bridge announces the discovery and the routing of a corresponding Service Server.
This behaviour (announcement from remote bridge) relies on the Liveliness Tokens declared to announce the discovery and the routing of each ROS entity (pub/sub, client/server for service/action).
Ideally, we would like a non-ROS pure-Zenoh Queryable to be detected as matching the
RouteServiceCli
without the need of a Liveliness Token, and thus having the route activated when detecting this Queryable. This requires the introduction of aQuerier
object in Zenoh, and the implementation of aMatchingStatus
listener in the same way than for thePublisher
(see eclipse-zenoh/zenoh#565).This will come later.