-
Notifications
You must be signed in to change notification settings - Fork 422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ignore-local-endpoints functionality to avoid double delivery #2202
Comments
alsora
changed the title
Discussion: add ignore-local-endpoints functionality
Add ignore-local-endpoints functionality
Jun 2, 2023
alsora
changed the title
Add ignore-local-endpoints functionality
Add ignore-local-endpoints functionality to avoid double delivery
Jun 2, 2023
@alsora just checking my understanding. So if we just rely on RMW thanks, |
This was referenced Oct 20, 2023
I prepared a set of PRs for the following:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ROS 2 currently has a problem with double-delivery of messages when combining intra-process and inter-process communication.
Consider for example a scenario where you have two processes:
When publisher A publishes a message, we would expect the message to be delivered to subscriber X via intra-process comm and to subscriber Y via inter-process comm.
However, what actually happens is a double delivery: the inter-process publication will indeed reach also subscriber X, which will then discard the message, but still wasting a non-negligible amount of resources.
In order to get around this problem, it's necessary to tell publisher A that it doesn't need to send inter-process messages to subscriber X which is in the same process and it's going to be serviced by intra-process comm.
ROS already has the concept of "ignore local endpoints", however this is applied to the whole process.
This can be problematic if in a process there are both entities with intra-process comm enabled and disabled.
We are working with eProsima to allow a more fine-grained control of the "ignore local endpoints" functionality, such that each ROS 2 entity can indicate that to the RMW.
This will allow to solve the problem of the double delivery.
In order to implement that, it looks like it's necessary to make some changes to the rclcpp logic that decides whether to publish inter or intra process.
Right now we check for
However, if publisher A is "ignoring local endpoints", this means that
get_subscription_count()
will only return the non-local ones.We think that the logic here should be changed into something like
The text was updated successfully, but these errors were encountered: