From d1f8967c4ab36786ca22d062d7e0e5fa78aab41a Mon Sep 17 00:00:00 2001 From: Sergi Hernandez Juan <shernand@iri.upc.edu> Date: Thu, 4 May 2023 13:09:13 +0200 Subject: [PATCH] Handled the timeout and watchdog internally. --- include/iri_ros_tools/module_action.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/iri_ros_tools/module_action.h b/include/iri_ros_tools/module_action.h index e299877..c960934 100644 --- a/include/iri_ros_tools/module_action.h +++ b/include/iri_ros_tools/module_action.h @@ -869,11 +869,16 @@ bool CModuleAction<action_ros,dyn_reconf_config>::is_finished(void) if(this->enabled) { + if(this->is_timeout_active() || this->is_watchdog_active()) + this->cancel(); action_state=action_client->getState(); if(action_state==actionlib::SimpleClientGoalState::ACTIVE || action_state==actionlib::SimpleClientGoalState::PENDING) return false; else + { + this->stop_timeout(); return true; + } } else return true; -- GitLab