From 3cc8a8f958ee52046226aa07f516417583b3feda Mon Sep 17 00:00:00 2001
From: Joan Perez Ibarz <jperez@iri.upc.edu>
Date: Tue, 5 Jul 2011 16:12:24 +0000
Subject: [PATCH] [iri_action_server]   - adding setAborted and isActive
 methods to public API

[loquendo_tts_node]
  - removing actionlib as dependency, now using iri_action_server

[hrengagement_node]
  - adding MoveBase action to interact with no_collision_node

[no_collision_node]
  - first version to test:
    - node is getting data from Odometry, Laser
    - input action available
    - publishing twist to platform
    - first approach for movePlatform
---
 include/iri_action_server/iri_action_server.h | 32 ++++++++++++++++++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/include/iri_action_server/iri_action_server.h b/include/iri_action_server/iri_action_server.h
index d70ba47..ed1c0b9 100755
--- a/include/iri_action_server/iri_action_server.h
+++ b/include/iri_action_server/iri_action_server.h
@@ -212,7 +212,25 @@ class IriActionServer
     * then starts the simple action server.
     */
     void start(void);
-    
+
+   /**
+    * \brief Abort Action
+    *
+    * Calls the ROS simple action server to abort current action
+    *
+    * \param  result An optional result to send back to any clients of the goal
+    * \param  text An optional text message to send back to any clients of the goal
+    */
+    void setAborted(const Result& result = Result(), const std::string& text = std::string(""));
+
+   /**
+    * \brief Action is Active
+    *
+    * Allows polling implementations to query about the status of the current goal
+    * @return True if a goal is active, false otherwise
+    */
+    bool isActive(void);
+
    /**
     * \brief Set Loop Rate
     *
@@ -318,6 +336,18 @@ void IriActionServer<ActionSpec>::start(void)
     ROS_FATAL("Some Callbacks have not been registered yet!");
 }
 
+template <class ActionSpec>
+void IriActionServer<ActionSpec>::setAborted(const Result& result, const std::string& text)
+{
+  as_.setAborted(result, text);
+}
+
+template <class ActionSpec>
+bool IriActionServer<ActionSpec>::isActive(void)
+{
+  return as_.isActive();
+}
+
 template <class ActionSpec>
 void IriActionServer<ActionSpec>::executeCallback(const GoalConstPtr& goal)
 {
-- 
GitLab