From bb35787dd3a12102c2c4009da14773ec26adb6ac Mon Sep 17 00:00:00 2001
From: Sergi Hernandez Juan <shernand@iri.upc.edu>
Date: Mon, 1 Jul 2024 09:51:01 +0200
Subject: [PATCH] Modified the ExecuteActivity result message. Added more
 information when requested.

---
 CMakeLists.txt                | 1 +
 action/ExecuteActivity.action | 4 +---
 msg/Date.msg                  | 2 +-
 msg/Result.msg                | 8 ++++++++
 srv/TextToSpeech.srv          | 2 +-
 5 files changed, 12 insertions(+), 5 deletions(-)
 create mode 100644 msg/Result.msg

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5bf67cb..a6ed2ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,6 +62,7 @@ add_message_files(
   Question.msg
   Screen.msg
   Speech.msg
+  Result.msg
 )
 
 ## Generate services in the 'srv' folder
diff --git a/action/ExecuteActivity.action b/action/ExecuteActivity.action
index 1e5d020..54bf5b1 100755
--- a/action/ExecuteActivity.action
+++ b/action/ExecuteActivity.action
@@ -2,8 +2,6 @@
 
 iri_raadical_msgs/Activity activity
 ---
-int32 return_code # Code after finishing the activity.
-string return_msg # Optional returning msg to pass information to higher levels.
+iri_raadical_msgs/Result result
 ---
 string feedback_status
-string[] answers
diff --git a/msg/Date.msg b/msg/Date.msg
index 9d6154d..10fe24a 100755
--- a/msg/Date.msg
+++ b/msg/Date.msg
@@ -3,4 +3,4 @@ int32 year
 int32 month
 int32 day
 int32 hour
-int32 minute
\ No newline at end of file
+int32 minute
diff --git a/msg/Result.msg b/msg/Result.msg
new file mode 100644
index 0000000..7158ff0
--- /dev/null
+++ b/msg/Result.msg
@@ -0,0 +1,8 @@
+string activity_id  # to identify the parent activity
+int32 return_code   # code after finishing the activity.
+string return_msg   # optional returning msg to pass information to higher levels.
+string[] answers    # sorted array containing each action answer. empty element if not captured or failed
+string[] emotions   # sorted array containing each action emotion. empty element if not captured or failed
+string[] locations  # sorted array containing each action location. empty element if not captured or failed
+geometry_msgs/Pose[] poses      # sorted Pose message containing each action pose. empty element if not captured or failed
+
diff --git a/srv/TextToSpeech.srv b/srv/TextToSpeech.srv
index 6391b11..7e35cfb 100644
--- a/srv/TextToSpeech.srv
+++ b/srv/TextToSpeech.srv
@@ -8,4 +8,4 @@ int32 emotion
     # 2: tristeza
     # 3: enfado
 ---
-string result
\ No newline at end of file
+string result
-- 
GitLab