Replace deprecated rclcpp::spin_some() (backport #541)#542
Merged
christophfroehlich merged 1 commit intokiltedfrom Nov 3, 2025
Merged
Replace deprecated rclcpp::spin_some() (backport #541)#542christophfroehlich merged 1 commit intokiltedfrom
christophfroehlich merged 1 commit intokiltedfrom
Conversation
(cherry picked from commit 18c4b12)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## kilted #542 +/- ##
==========================================
+ Coverage 82.61% 82.74% +0.12%
==========================================
Files 29 29
Lines 1985 1999 +14
Branches 113 113
==========================================
+ Hits 1640 1654 +14
Misses 276 276
Partials 69 69
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 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.
Overview
This PR replaces deprecated rclcpp::spin_some(...) calls in control_toolbox/test/pid_ros_parameters_tests.cpp with a rclcpp::executors::SingleThreadedExecutor, as suggested in #488.
What changed
Files changed are:
In this PR we update control_toolbox/control_toolbox/test/pid_ros_parameters_tests.cpp so that the two tests which were using the deprecated rclcpp::spin_some(...) now create a rclcpp::executors::SingleThreadedExecutor, add the test node to it once, and call executor.spin_some() instead. This applies to TEST(PidParametersTest, SetParametersTest) and to TEST(PidParametersTest, SetBadParametersTest), where we replaced all the previous rclcpp::spin_some(...) calls with the executor-based version to match the current ROS 2 recommendation and to remove the deprecation warning.
Notes for Reviewer
I am very open to feedback and am happy to make any changes that are requested.
This is an automatic backport of pull request #541 done by Mergify.