Check rclcpp::ok before sleeping for clean shutdown (backport #3484)#3485
Merged
Check rclcpp::ok before sleeping for clean shutdown (backport #3484)#3485
Conversation
Calling rate.sleep() on shutdown will crash (cherry picked from commit f4cf780) # Conflicts: # moveit_ros/planning/planning_scene_monitor/src/planning_scene_monitor.cpp
Author
|
Cherry-pick of f4cf780 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
rhaschke
reviewed
May 28, 2025
moveit_ros/planning/planning_scene_monitor/src/planning_scene_monitor.cpp
Outdated
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## humble #3485 +/- ##
==========================================
- Coverage 50.96% 50.95% -0.00%
==========================================
Files 390 390
Lines 32520 32521 +1
==========================================
- Hits 16569 16568 -1
- Misses 15951 15953 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
In MTC PR#684 I found move_group fails to shut down cleanly when preempting motion. This is because we are asking the node to sleep when the stack has been requested to shut down. To fix this I added a simple guard to make sure
rclcpp::ok()before sleeping.Here is a snippet of the stack trace when shutting down.
Checklist
This is an automatic backport of pull request #3484 done by [Mergify](https://mergify.com).