-
Notifications
You must be signed in to change notification settings - Fork 425
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
Possible bug: executor_entities_collection.hpp::update_entities #2632
Comments
I'm not sure I understand the problem here. Currently all executors require that the entity passed to |
The problem is, that the documentation of the method / class does not match the behavior. It states, one will get a on_removed callback, whenever 'update_to' does not contain the entry. I noticed this, as I tried to use this class and depended on the behavior, that on_removed is called, to clean up This class is used extensively in the executor. Therefore I was wondering, if there is a place |
Ok, thanks for the explanation. So essentially we have two options:
I don't have a strong opinion, although i probably prefer the first. In any case, we should do something. |
Bug report
rclcpp/rclcpp/include/rclcpp/executors/executor_entities_collection.hpp
Lines 75 to 82 in a78d0cb
I am confused about the
if (entity) {
in line 78. Would this not lead to the on_removed callback not being called, in race cases, even though the element was removed ?
@wjwwood @mjcarroll Is this intended, or a bug ?
Obviously, it's kind of useless, to call the callback with a nullptr, but the behavior is still strange to me. I ran into this issue, as internal structures of my code were not cleaned up, due to the callback not being called.
The text was updated successfully, but these errors were encountered: