Repository navigation
doc(executors): clarify that update_entities callbacks are only fired for valid entities (fixes #2632) - #3402
Open
Aaravanand00 wants to merge 1 commit into
Open
Aaravanand00 wants to merge 1 commit into
Aaravanand00 wants to merge 1 commit into
Conversation
… for valid entities (fixes ros2#2632) Signed-off-by: Aaravanand <aaravanand@gmail.com>
ABI Compliance Check✅ Verdict: compatible
✅
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Fixes #2632
Per the discussion in #2632,
update_entities()andEntityCollection::update()inrclcpp/executors/executor_entities_collection.hpponly invoke theon_addedandon_removedcallbacks when the entity'sweak_ptrcan be locked into a validshared_ptr. If an entity has already expired beforeupdate_entities()runs, it is still removed from (or inserted into) the collection, but the callback is suppressed to preventnullptrdereferences in executor callback implementations.Previously, the docstrings stated that the callback fires for every entry added or removed without mentioning the valid/non-expired entity requirement, causing confusion when custom executor implementations expected callbacks for expired entries.
As suggested by @alsora in #2632 (Option 1), this PR updates the Doxygen documentation for
update_entitiesandEntityCollection::updateto clearly state this behavior.Is this user-facing behavior change?
No code changes; documentation clarification only.
Did you use Generative AI?
AI was used to assist in formatting and verifying docstrings against ROS 2 linter standards.
Additional Information
ament_cpplint --linelength=100 --filters=+whitespace/line_length(0 problems found).ament_uncrustify(0 code style divergence).