From 30373eefc2431e02ac4d1013eb82a3a33d1a7a7f Mon Sep 17 00:00:00 2001
From: Alopez <alopez@iri.upc.edu>
Date: Fri, 13 Jan 2023 17:12:05 +0100
Subject: [PATCH] Updated msgs to last version

---
 CMakeLists.txt                |  5 ++---
 action/ask_question.action    | 11 -----------
 action/ask_questionary.action |  9 +++++----
 action/ask_questions.action   | 12 ++++++++++++
 srv/check_face.srv            |  5 -----
 srv/get_person_location.srv   |  5 -----
 srv/get_rooms_to_search.srv   |  7 +++++++
 7 files changed, 26 insertions(+), 28 deletions(-)
 delete mode 100644 action/ask_question.action
 create mode 100644 action/ask_questions.action
 delete mode 100644 srv/check_face.srv
 delete mode 100644 srv/get_person_location.srv
 create mode 100644 srv/get_rooms_to_search.srv

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6a16c64..fd083d2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,8 +56,7 @@ find_package(catkin REQUIRED COMPONENTS
 ## Generate services in the 'srv' folder
 add_service_files(
   FILES
-  check_face.srv
-  get_person_location.srv
+  get_rooms_to_search.srv
   upload_answers.srv
 #   Service1.srv
 #   Service2.srv
@@ -67,7 +66,7 @@ add_service_files(
 add_action_files(
   FILES
   ask_questionary.action
-  ask_question.action
+  ask_questions.action
 #   Action2.action
 )
 
diff --git a/action/ask_question.action b/action/ask_question.action
deleted file mode 100644
index 267694d..0000000
--- a/action/ask_question.action
+++ /dev/null
@@ -1,11 +0,0 @@
-# Action to ask question
-#### Return code
-uint8 REPEAT=0 # To ask the same question.
-uint8 NEXT=1 # To ask next question.
-uint8 END=2 # To finish the questionary.
-
-string question_id # Question reference to be asked.
----
-int32 return_code # Code after analizing the response.
-string return_msg # Optional returning msg to pass information to higher levels.
----
diff --git a/action/ask_questionary.action b/action/ask_questionary.action
index 415124b..0cd8476 100644
--- a/action/ask_questionary.action
+++ b/action/ask_questionary.action
@@ -1,16 +1,17 @@
 # Action to start the mison to ask a questionary to the user.
 ##### Result code
 uint8 SUCCESS=0 # All ok.
-uint8 PNOTFOUND=1 # Person don't found.
-uint8 QNOTFOUND=2 # Questionary not found.
+uint8 QERR=1 # Error parsing questionary.
+uint8 PNOTFOUND=2 # Person not found.
 uint8 QNOTFINISH=3 # Something went wrong in the questionary
 uint8 ANOTSENT=4 # Error sending answers.
 uint8 NOTHOME=5 # Error when going back to home
 
 ##### Status code
 uint8 SEARCHING=0 # Searching the person
-uint8 ASKING=1 # Asking the questionary
-uint8 RETURNING=2 # Returning home.
+uint8 APPROACHING=1 #Person found. Approaching person.
+uint8 ASKING=2 # Asking the questionary
+uint8 RETURNING=3 # Returning home.
 
 string questionary_id #Questionary name.
 string[] questions_id #Vector with the questions references to ask. If empty ask all.
diff --git a/action/ask_questions.action b/action/ask_questions.action
new file mode 100644
index 0000000..d654ddd
--- /dev/null
+++ b/action/ask_questions.action
@@ -0,0 +1,12 @@
+# Action to ask question
+#### Return code
+uint8 SUCCESS=0 # Questionary successfully finished.
+uint8 QERR=1 # Error reading questionary.
+uint8 QNOTFINISHED=2 # Q.
+
+string questionary_id #Questionary name.
+string[] questions_id #Vector with the questions references to ask. If empty ask all.
+---
+int32 return_code # Code after analizing the response.
+string return_msg # Optional returning msg to pass information to higher levels.
+---
diff --git a/srv/check_face.srv b/srv/check_face.srv
deleted file mode 100644
index b58e290..0000000
--- a/srv/check_face.srv
+++ /dev/null
@@ -1,5 +0,0 @@
-# Service to check with facial recognition if the person in the image is the user.
-
-sensor_msgs/Image img # Face to be recognize.
----
-bool found # Boolean to know if is the correct person.
diff --git a/srv/get_person_location.srv b/srv/get_person_location.srv
deleted file mode 100644
index d515764..0000000
--- a/srv/get_person_location.srv
+++ /dev/null
@@ -1,5 +0,0 @@
-# Service to get an ordered vector with the user location probability
-
-string current_room # Where is the robot
----
-string[] searching_rooms # Ordered rooms' list to search the user
diff --git a/srv/get_rooms_to_search.srv b/srv/get_rooms_to_search.srv
new file mode 100644
index 0000000..97355e9
--- /dev/null
+++ b/srv/get_rooms_to_search.srv
@@ -0,0 +1,7 @@
+# Service to get an ordered vector with the user location probability
+
+
+string[] room_names # Vector with the room names.
+float64[] room_distances # distances to each room.
+---
+string[] searching_rooms # Ordered rooms' list to search for the user
-- 
GitLab