From cbc45340ba126b63c2d7f3a8dba2027fd825de35 Mon Sep 17 00:00:00 2001 From: Skyler Medeiros Date: Mon, 13 Jul 2026 15:09:51 -0700 Subject: [PATCH 1/4] add deprecation warning to EventsExecutor Signed-off-by: Skyler Medeiros --- .../executors/events_executor/events_executor.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rclcpp/include/rclcpp/experimental/executors/events_executor/events_executor.hpp b/rclcpp/include/rclcpp/experimental/executors/events_executor/events_executor.hpp index 077d38b002..dab0dbf843 100644 --- a/rclcpp/include/rclcpp/experimental/executors/events_executor/events_executor.hpp +++ b/rclcpp/include/rclcpp/experimental/executors/events_executor/events_executor.hpp @@ -56,7 +56,11 @@ namespace executors * executor.spin(); * executor.remove_node(node); */ -class EventsExecutor : public rclcpp::Executor +class +[[deprecated( + "rclcpp::experimental::executors::EventsExecutor is deprecated and will be removed in " + "m-turtle. use rclcpp::executors::EventsCBGExecutor in single-threaded mode instead")]] +EventsExecutor : public rclcpp::Executor { public: RCLCPP_SMART_PTR_DEFINITIONS(EventsExecutor) From 20f2f33d20ae3f85f4472f5489be09d8a4d85d7f Mon Sep 17 00:00:00 2001 From: Skyler Medeiros Date: Mon, 13 Jul 2026 15:12:44 -0700 Subject: [PATCH 2/4] Disable deprecation warnings for EventsExecutor tests and source Signed-off-by: Skyler Medeiros --- .../executors/events_executor/events_executor.cpp | 6 ++++++ rclcpp/test/rclcpp/executors/executor_types.hpp | 7 +++++++ rclcpp/test/rclcpp/executors/test_events_executor.cpp | 7 +++++++ rclcpp/test/rclcpp/executors/test_executors_warmup.cpp | 6 ++++++ 4 files changed, 26 insertions(+) diff --git a/rclcpp/src/rclcpp/experimental/executors/events_executor/events_executor.cpp b/rclcpp/src/rclcpp/experimental/executors/events_executor/events_executor.cpp index 4a3f8f796f..85ad3d2ed2 100644 --- a/rclcpp/src/rclcpp/experimental/executors/events_executor/events_executor.cpp +++ b/rclcpp/src/rclcpp/experimental/executors/events_executor/events_executor.cpp @@ -18,10 +18,14 @@ #include #include +#include "rcpputils/compile_warnings.hpp" #include "rcpputils/scope_exit.hpp" using namespace std::chrono_literals; +// Disable deprecation warnings while maintaining the EventsExecutor +RCPPUTILS_DEPRECATION_WARNING_OFF_START + using rclcpp::experimental::executors::EventsExecutor; EventsExecutor::EventsExecutor( @@ -454,3 +458,5 @@ EventsExecutor::add_notify_waitable_to_collection( {this->notify_waitable_, weak_group_ptr} }); } + +RCPPUTILS_DEPRECATION_WARNING_OFF_STOP diff --git a/rclcpp/test/rclcpp/executors/executor_types.hpp b/rclcpp/test/rclcpp/executors/executor_types.hpp index f5dd175d2b..b5e857aeb3 100644 --- a/rclcpp/test/rclcpp/executors/executor_types.hpp +++ b/rclcpp/test/rclcpp/executors/executor_types.hpp @@ -20,11 +20,16 @@ #include #include +#include "rcpputils/compile_warnings.hpp" + #include "rclcpp/executors/events_cbg_executor/events_cbg_executor.hpp" #include "rclcpp/experimental/executors/events_executor/events_executor.hpp" #include "rclcpp/executors/single_threaded_executor.hpp" #include "rclcpp/executors/multi_threaded_executor.hpp" +// Disable deprecation warnings while maintaining the EventsExecutor +RCPPUTILS_DEPRECATION_WARNING_OFF_START + using ExecutorTypes = ::testing::Types< rclcpp::executors::SingleThreadedExecutor, @@ -65,4 +70,6 @@ using StandardExecutors = rclcpp::executors::EventsCBGExecutor, rclcpp::experimental::executors::EventsExecutor>; +RCPPUTILS_DEPRECATION_WARNING_OFF_STOP + #endif // RCLCPP__EXECUTORS__EXECUTOR_TYPES_HPP_ diff --git a/rclcpp/test/rclcpp/executors/test_events_executor.cpp b/rclcpp/test/rclcpp/executors/test_events_executor.cpp index 41c25d2979..8a24f5b336 100644 --- a/rclcpp/test/rclcpp/executors/test_events_executor.cpp +++ b/rclcpp/test/rclcpp/executors/test_events_executor.cpp @@ -21,9 +21,14 @@ #include "rclcpp/experimental/executors/events_executor/events_executor.hpp" #include "rclcpp/node.hpp" +#include "rcpputils/compile_warnings.hpp" + #include "test_msgs/srv/empty.hpp" #include "test_msgs/msg/empty.hpp" +// Disable deprecation warnings while maintaining the EventsExecutor +RCPPUTILS_DEPRECATION_WARNING_OFF_START + using namespace std::chrono_literals; using rclcpp::experimental::executors::EventsExecutor; @@ -672,3 +677,5 @@ TEST_F(TestEventsExecutor, keep_all_transient_local_receives_cached_message) "rmw_subscription_set_on_new_message_callback where unread_count " "is incorrectly clipped to depth=0 for KEEP_ALL history."; } + +RCPPUTILS_DEPRECATION_WARNING_OFF_STOP diff --git a/rclcpp/test/rclcpp/executors/test_executors_warmup.cpp b/rclcpp/test/rclcpp/executors/test_executors_warmup.cpp index ab5a362f17..257d009c9d 100644 --- a/rclcpp/test/rclcpp/executors/test_executors_warmup.cpp +++ b/rclcpp/test/rclcpp/executors/test_executors_warmup.cpp @@ -26,6 +26,8 @@ #include #include +#include "rcpputils/compile_warnings.hpp" + #include "rclcpp/rclcpp.hpp" #include "test_msgs/msg/empty.hpp" @@ -146,11 +148,13 @@ TYPED_TEST(TestExecutorsWarmup, spin_some_doesnt_require_warmup) // TODO(alsora): currently only the events-executor passes this test. // Enable single-threaded and multi-threaded executors // when https://github.com/ros2/rclcpp/pull/2595 gets merged + RCPPUTILS_DEPRECATION_WARNING_OFF_START if ( !std::is_same()) { GTEST_SKIP(); } + RCPPUTILS_DEPRECATION_WARNING_OFF_STOP ExecutorType executor; @@ -191,11 +195,13 @@ TYPED_TEST(TestExecutorsWarmup, spin_some_doesnt_require_warmup_with_cbgroup) // TODO(alsora): currently only the events-executor passes this test. // Enable single-threaded and multi-threaded executors // when https://github.com/ros2/rclcpp/pull/2595 gets merged + RCPPUTILS_DEPRECATION_WARNING_OFF_START if ( !std::is_same()) { GTEST_SKIP(); } + RCPPUTILS_DEPRECATION_WARNING_OFF_STOP ExecutorType executor; From d19feb9e7491d588cdaa7a5106bb61c3f6dbb328 Mon Sep 17 00:00:00 2001 From: Skyler Medeiros Date: Mon, 13 Jul 2026 15:14:18 -0700 Subject: [PATCH 3/4] migrate action server test to cbg executor Signed-off-by: Skyler Medeiros --- rclcpp_action/test/test_server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rclcpp_action/test/test_server.cpp b/rclcpp_action/test/test_server.cpp index a7c109d868..676d3d3526 100644 --- a/rclcpp_action/test/test_server.cpp +++ b/rclcpp_action/test/test_server.cpp @@ -1067,7 +1067,7 @@ TEST_F(TestServer, goals_expired_with_events_executor) rclcpp::ExecutorOptions opts; opts.context = node->get_node_base_interface()->get_context(); - rclcpp::experimental::executors::EventsExecutor executor(opts); + rclcpp::executors::EventsCBGExecutor executor(opts, 1); executor.add_node(node); const std::vector uuids{ {{1, 2, 3, 40, 5, 6, 70, 8, 9, 1, 11, 120, 13, 140, 15, 160}}, From 3cb984c1f3805d40f4dde6c4f4b34736fbac244d Mon Sep 17 00:00:00 2001 From: Skyler Medeiros Date: Tue, 14 Jul 2026 09:52:27 -0700 Subject: [PATCH 4/4] suppress deprecation warning in component_container_event.cpp Signed-off-by: Skyler Medeiros --- rclcpp_components/src/component_container_event.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rclcpp_components/src/component_container_event.cpp b/rclcpp_components/src/component_container_event.cpp index fa28a55395..a396ededcd 100644 --- a/rclcpp_components/src/component_container_event.cpp +++ b/rclcpp_components/src/component_container_event.cpp @@ -14,6 +14,7 @@ #include +#include "rcpputils/compile_warnings.hpp" #include "rclcpp/utilities.hpp" #include "rclcpp/experimental/executors/events_executor/events_executor.hpp" @@ -27,7 +28,12 @@ int main(int argc, char * argv[]) /// Component container with an events executor. rclcpp::init(argc, argv); + + // Disable deprecation warnings while maintaining the EventsExecutor + RCPPUTILS_DEPRECATION_WARNING_OFF_START auto exec = std::make_shared(); + RCPPUTILS_DEPRECATION_WARNING_OFF_STOP + auto node = std::make_shared(exec); exec->add_node(node); exec->spin();