From efab56b4532a0c29e6d9b8bd85d6b44e4d24d91e Mon Sep 17 00:00:00 2001 From: GoesM <130988564+GoesM@users.noreply.github.com> Date: Fri, 31 May 2024 23:41:13 +0800 Subject: [PATCH] earlier `executor_thread_.reset()` in nav2_costmap_ros (#4385) * reorder cleanup_queue Signed-off-by: goes * codestyle Signed-off-by: goes * codestyle Signed-off-by: goes --------- Signed-off-by: goes Co-authored-by: goes --- nav2_costmap_2d/src/costmap_2d_ros.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/nav2_costmap_2d/src/costmap_2d_ros.cpp b/nav2_costmap_2d/src/costmap_2d_ros.cpp index b039a8554f1..6783c794924 100644 --- a/nav2_costmap_2d/src/costmap_2d_ros.cpp +++ b/nav2_costmap_2d/src/costmap_2d_ros.cpp @@ -354,6 +354,7 @@ nav2_util::CallbackReturn Costmap2DROS::on_cleanup(const rclcpp_lifecycle::State & /*state*/) { RCLCPP_INFO(get_logger(), "Cleaning up"); + executor_thread_.reset(); costmap_publisher_.reset(); clear_costmap_service_.reset(); @@ -368,8 +369,6 @@ Costmap2DROS::on_cleanup(const rclcpp_lifecycle::State & /*state*/) footprint_sub_.reset(); footprint_pub_.reset(); - - executor_thread_.reset(); return nav2_util::CallbackReturn::SUCCESS; }