This repository has been archived by the owner on Jan 7, 2023. It is now read-only.
Fix node discovery with dps middleware in ROS2 #124
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.
Currently node discovery does not work with dps middleware in ROS2.
The issue is as follows: When a subscriber comes online it sends out a
multicast discovery message. All the subscriber topics (bloom filter
outputs) are merged in a union and sent out as an "interest" message.
When the multicast message is received by the publishing node, it checks
whether any topic is in the set of the received interest. If a match is
found a unicast connection is created and the published message is sent
to the subscriber.
However at the moment, the publisher's bloom filter output is the union
over all possible wildcards, whereas a reduced set is calculated on the subscriber.
Thus the publisher's bloom filter output will not be in the set of the
subscriber's interests. Hence, the unicast connection is not created.
This commit makes sure the subscriber's interests are created in a
symmetrical way to the publisher side which solves the discovery
problem.
Also when creating the publisher's discovery interest use the wildcard
option. This is primarily so that discovery information is sent out
on localhost given the above change.
TODO: dps-micro updates
Signed-off-by: Andriy Gelman [email protected]