From 86e4f596355f0b38e1843171d32aa5499f71f902 Mon Sep 17 00:00:00 2001 From: Sergi Hernandez Juan <shernand@iri.upc.edu> Date: Thu, 4 May 2023 13:07:58 +0200 Subject: [PATCH] Halt the tree when the tree returns FAILURE. --- include/iri_base_bt_client/iri_base_bt_client.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/iri_base_bt_client/iri_base_bt_client.h b/include/iri_base_bt_client/iri_base_bt_client.h index 7bf61ad..d626e76 100644 --- a/include/iri_base_bt_client/iri_base_bt_client.h +++ b/include/iri_base_bt_client/iri_base_bt_client.h @@ -701,6 +701,8 @@ void *IriBaseBTClient<ConfigClass>::mainThread(void *param) { iriNode->user_loop(); iriNode->status=iriNode->tree.tickRoot(); + if(iriNode->status==BT::NodeStatus::FAILURE) + iriNode->tree.haltTree(); ROS_DEBUG_STREAM("Tree status: " << iriNode->status); } catch(BT::LogicError &e) -- GitLab