Check for association with an executor before removing nodes in ComponentManager#3190
Check for association with an executor before removing nodes in ComponentManager#3190skyegalaxy wants to merge 3 commits into
Conversation
|
Tick the box to add this pull request to the merge queue (same as
|
|
Pulls: #3190 |
fujitatomoya
left a comment
There was a problem hiding this comment.
i have 2 comments.
- should be also updated align with implementation.
rclcpp/rclcpp/include/rclcpp/executor.hpp
Line 224 in d031217
- normal Ctrl+C shutdown will now WARN-spam once per node, every time. the double-remove sequence is still deterministic though. either the coordination should also be fixed (e.g., ~ComponentManager skips nodes whose association flag is already clear, or EventsCBGExecutor's shutdown notifies/clears differently)? warning on every clean shutdown trains users to ignore warnings?
|
I appreciate your review and feedback @fujitatomoya ! I updated the docstrings here and also added a check in the component manager destructor for if the node's already associated with an executor before removing. That gets rid of the warning for the test case I added on my end. |
|
Hm, so now we are anyway at the point, were we fixed the source of the exception. Should we leave it in then ? |
|
yeah you're right @jmachowinski , I'll keep the check in component container and undo my other changes |
Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
Signed-off-by: Skyler Medeiros <skye@polymathrobotics.com>
8d04f58 to
cdc1c94
Compare
|
I removed the commits which got rid of the exception, and updated the PR title and description |
Description
This PR changes the destructor of
component_managerto check each node it's removing for if it is already associated with an executor.A regression test has also been added to
test_component_manager_apiin rclcpp_components, which asserts that an exception isn't thrown during the double-removal case as outlined in #3186Fixes #3186
Is this user-facing behavior change?
Did you use Generative AI?
Claude Opus 4.8
Additional Information