From 38a48011013e734e85f0700281dda7de2e04abbf Mon Sep 17 00:00:00 2001 From: Captain Yoshi Date: Tue, 16 Jul 2024 12:18:14 -0400 Subject: [PATCH] reset the preempt flag when leaving Task::plan() --- core/src/task.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/task.cpp b/core/src/task.cpp index 4058fdfc7..cb9b8a803 100644 --- a/core/src/task.cpp +++ b/core/src/task.cpp @@ -46,6 +46,8 @@ #include #include +#include + #include namespace { @@ -234,6 +236,9 @@ void Task::compute() { } moveit::core::MoveItErrorCode Task::plan(size_t max_solutions) { + // ensure that the preempt flag is resetted once this method is exited + auto guard = sg::make_scope_guard([this]() noexcept { this->resetPreemptFlag(); }); + auto impl = pimpl(); init();