deprecate rclcpp::spin_some and rclcpp::spin_all#2848
Conversation
e8e8faf to
f1e7310
Compare
|
@Mergifyio rebase |
✅ Branch has been successfully rebased |
f9d55bd to
5cbdae6
Compare
|
Pulls: #2848 |
…match the other executors Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
…omments Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
5cbdae6 to
c35493d
Compare
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
|
Pulls: #2848, ros2/message_filters#201, ros2/system_tests#574, ros2/demos#734, ros2/examples#422, ros2/geometry2#821 |
Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
|
after ros/ros_tutorials#183 is merged, we can start the CI only with this PR. (there should not be any deprecated warning.) |
Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
Signed-off-by: Alberto Soragna <alberto.soragna@gmail.com>
a866ac9 to
c8c7b06
Compare
|
Pulls: #2848 |
rclcpp/include/rclcpp/experimental/executors/events_executor/events_executor.hpp
Show resolved
Hide resolved
* Fix image_common NodeT deprecation warnings from ros-perception/image_common#352 - migrate to NodeInterfaces * Fix image_common rmw_qos_profile_t deprecation warnings from ros-perception/image_common#364 - migrate to rclcpp::QoS * Fix rviz update float deprecation warnings from ros2/rviz#1533 - migrate to std::chrono::duration * Fix geometry2 tf2_ros .h deprecation warnings from ros2/geometry2#805 - migrate Kilted and Rolling to .hpp * Fix geometry2 tf2_ros NodeT deprecation warnings from ros2/geometry2#714 - migrate to NodeInterfaces * Fix rclcpp spin_some deprecation warnings from ros2/rclcpp#2848 - migrate to SingleThreadedExecutor --------- Co-authored-by: Andrea <realeandrea@yahoo.it>
* Fix image_common NodeT deprecation warnings from ros-perception/image_common#352 - migrate to NodeInterfaces * Fix image_common rmw_qos_profile_t deprecation warnings from ros-perception/image_common#364 - migrate to rclcpp::QoS * Fix rviz update float deprecation warnings from ros2/rviz#1533 - migrate to std::chrono::duration * Fix geometry2 tf2_ros .h deprecation warnings from ros2/geometry2#805 - migrate Kilted and Rolling to .hpp * Fix geometry2 tf2_ros NodeT deprecation warnings from ros2/geometry2#714 - migrate to NodeInterfaces * Fix rclcpp spin_some deprecation warnings from ros2/rclcpp#2848 - migrate to SingleThreadedExecutor --------- Co-authored-by: Andrea <realeandrea@yahoo.it>
Description
Deprecate
rclcpp::spin_someandrclcpp::spin_all.These functions can lead to very poor performance for developers who are not aware that calling them will:
If called in a loop, you are wasting a lot of CPU cycles repeating those operations every time.
This instead is a lot more efficient because only the spin operation is repeated as expected.
Adding and removing nodes from executors are expensive operations that shouldn't be done at "steady state" of the system.
IMPORTANT
In this PR I'm also re-ordering the events-executor constructor arguments so that this becomes possible:
Now all executors take the executor options as first argument.
Is this user-facing behavior change?
Yes, deprecating some functions and modifying a constructor (although it's in the experimental namespace)
Did you use Generative AI?
No
closes #2675