From 7e29c685c20b82595ff41f53e3ef583e3840a71c Mon Sep 17 00:00:00 2001 From: Janosch Machowinski Date: Wed, 18 Dec 2024 17:37:12 +0100 Subject: [PATCH] fix(Executor): Don't add the notify_waitable two times to the waitset Signed-off-by: Janosch Machowinski --- rclcpp/src/rclcpp/executor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rclcpp/src/rclcpp/executor.cpp b/rclcpp/src/rclcpp/executor.cpp index 640ffc4b98..160709fb98 100644 --- a/rclcpp/src/rclcpp/executor.cpp +++ b/rclcpp/src/rclcpp/executor.cpp @@ -84,7 +84,9 @@ Executor::Executor(const rclcpp::ExecutorOptions & options) notify_waitable_->add_guard_condition(interrupt_guard_condition_); notify_waitable_->add_guard_condition(shutdown_guard_condition_); - wait_set_.add_waitable(notify_waitable_); + // we need to initially rebuild the collection, + // so that the notify_waitable_ is added + collect_entities(); } Executor::~Executor()