From 13d62b4eeea166ba92b3e87d7cd881d5f79455b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sergi=20Hern=C3=A0ndez=20Juan?= <shernand@iri.upc.edu>
Date: Wed, 11 Oct 2017 14:04:30 +0000
Subject: [PATCH] Removed an unnecessary call to the action's get_state()
 function.

---
 include/iri_ros_tools/module_action.h | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/include/iri_ros_tools/module_action.h b/include/iri_ros_tools/module_action.h
index 64b7829..0af4c93 100644
--- a/include/iri_ros_tools/module_action.h
+++ b/include/iri_ros_tools/module_action.h
@@ -694,11 +694,8 @@ bool CModuleAction<action_ros>::is_finished(void)
 template<class action_ros>
 action_status CModuleAction<action_ros>::get_state(void)
 {
-  actionlib::SimpleClientGoalState action_state(actionlib::SimpleClientGoalState::PENDING);
-  
   if(this->status==ACTION_RUNNING)
   {
-    action_state=action_client->getState();
     if(this->use_timeout && this->is_timeout_active())
       this->status=ACTION_TIMEOUT;
     if(this->is_watchdog_active())
-- 
GitLab