From 3f6f6af9d5c2d7ebdbb46cda159ae3933ccb301a Mon Sep 17 00:00:00 2001 From: Alejandro Lopez Gestoso <alopez@iri.upc.edu> Date: Wed, 3 Jan 2024 10:49:11 +0100 Subject: [PATCH] Adapted to last IRD interface --- CMakeLists.txt | 19 +++++++++---- action/ExecuteAction.action | 23 +++++++++++++++ action/ExecuteActivity.action | 8 ++++++ action/Speak.action | 10 +++++++ action/ask_questionary.action | 53 ----------------------------------- action/ask_questions.action | 17 ++--------- msg/Action.msg | 8 ++++++ msg/Activity.msg | 13 +++++++++ msg/Answer.msg | 1 + msg/Date.msg | 6 ++++ msg/Movement.msg | 21 ++++++++++++++ msg/Question.msg | 2 ++ msg/Screen.msg | 4 +++ msg/Speech.msg | 18 ++++++++++++ srv/ScheduleActivity.srv | 11 ++++++++ srv/SetAnswer.srv | 6 ++++ srv/SetScreen.srv | 6 ++++ srv/get_rooms_to_search.srv | 7 ----- 18 files changed, 153 insertions(+), 80 deletions(-) create mode 100755 action/ExecuteAction.action create mode 100755 action/ExecuteActivity.action create mode 100755 action/Speak.action delete mode 100644 action/ask_questionary.action create mode 100755 msg/Action.msg create mode 100755 msg/Activity.msg create mode 100755 msg/Answer.msg create mode 100755 msg/Date.msg create mode 100755 msg/Movement.msg create mode 100644 msg/Question.msg create mode 100755 msg/Screen.msg create mode 100755 msg/Speech.msg create mode 100755 srv/ScheduleActivity.srv create mode 100644 srv/SetAnswer.srv create mode 100644 srv/SetScreen.srv delete mode 100644 srv/get_rooms_to_search.srv diff --git a/CMakeLists.txt b/CMakeLists.txt index 24c4721..92840e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,26 +53,35 @@ add_message_files( FILES target_state.msg human_pose_classification.msg + Action.msg + Activity.msg + Answer.msg + Date.msg + Movement.msg + Question.msg + Screen.msg + Speech.msg ) ## Generate services in the 'srv' folder add_service_files( FILES - get_rooms_to_search.srv upload_answers.srv get_current_room.srv get_current_person_pose.srv -# Service1.srv -# Service2.srv + ScheduleActivity.srv + SetAnswer.srv + SetScreen.srv ) ## Generate actions in the 'action' folder add_action_files( FILES - ask_questionary.action ask_questions.action remote_control.action -# Action2.action + ExecuteAction.action + ExecuteActivity.action + Speak.action ) ## Generate added messages and services with any dependencies listed here diff --git a/action/ExecuteAction.action b/action/ExecuteAction.action new file mode 100755 index 0000000..c0d1651 --- /dev/null +++ b/action/ExecuteAction.action @@ -0,0 +1,23 @@ +# Action to execute an action +##### Result code +uint8 SUCCESS=0 # All ok. +uint8 SEARCHNAVERR=1 # Navigation error when searching the person. +uint8 NOROOMS=2 # No rooms received to search. +uint8 PNOTFOUND=3 # Person not found. +uint8 PLOST=4 # Person lost while approaching. +uint8 APPROCHNAVERR=5 # Navigation error when approaching person. +uint8 MOTIONERR=6 # Error when playing motion. +uint8 QNOTFINISH=7 # Something went wrong in the questionary +uint8 ANOTSENT=8 # Error sending answers. +uint8 NOTHOME=9 # Error when going back to home +uint8 UNKNOWNERR=10 # Unknown error. +uint8 SENTERR=11 # Error capturing sentiment. +uint8 ROOMERR=12 # Error getting localization. +uint8 POSEERR=13 # Error capturing pose. + +iri_raadical_msgs/Action action +--- +int32 return_code # Code after finishing the action. +string return_msg # Optional returning msg to pass information to higher levels. +--- +string feedback_status diff --git a/action/ExecuteActivity.action b/action/ExecuteActivity.action new file mode 100755 index 0000000..9568570 --- /dev/null +++ b/action/ExecuteActivity.action @@ -0,0 +1,8 @@ +# Action to execute an activity + +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. +--- +string feedback_status diff --git a/action/Speak.action b/action/Speak.action new file mode 100755 index 0000000..c380894 --- /dev/null +++ b/action/Speak.action @@ -0,0 +1,10 @@ +# Action to generate robot speech + +string speaking_text +int32 language +int32 speaking_mode +--- +int32 return_code # Code after finishing the activity. +string return_msg # Optional returning msg to pass information to higher levels. +--- +string feedback_status \ No newline at end of file diff --git a/action/ask_questionary.action b/action/ask_questionary.action deleted file mode 100644 index ed5a5c9..0000000 --- a/action/ask_questionary.action +++ /dev/null @@ -1,53 +0,0 @@ -# Action to start the mison to ask a questionary to the user. -##### Result code -uint8 SUCCESS=0 # All ok. -uint8 SEARCHNAVERR=1 # Navigation error when searching the person. -uint8 NOROOMS=2 # No rooms received to search. -uint8 PNOTFOUND=3 # Person not found. -uint8 PLOST=4 # Person lost while approaching. -uint8 APPROCHNAVERR=5 # Navigation error when approaching person. -uint8 MOTIONERR=6 # Error when playing motion. -uint8 QNOTFINISH=7 # Something went wrong in the questionary -uint8 ANOTSENT=8 # Error sending answers. -uint8 NOTHOME=9 # Error when going back to home -uint8 UNKNOWNERR=10 # Unknown error. -uint8 SENTERR=11 # Error capturing sentiment. -uint8 ROOMERR=12 # Error getting localization. -uint8 POSEERR=13 # Error capturing pose. - -##### Language code -uint8 ENGLISH=0 -uint8 CATALAN=1 -uint8 SPANISH=2 - -##### Tone/Sentiment code -uint8 UNKNOWN=0 -uint8 HAPPY=1 -uint8 SAD=2 -uint8 NEUTRAL=3 - -##### Status code -uint8 SEARCHING=0 # Searching the person -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. -string[] response_options #Vector with the answers -int32 language # language code -int32 tone # Tone code -bool screen_answers # Bool to show screen answers -string screen # Screen to be displayed -string motion # Motion name -bool get_answer # Bool to wait for an answer -bool get_sentiment # Bool to get sentiment -bool get_room # Bool to get room -bool get_pose # Bool to get person pose ---- -int32 result_code #Result code. -string result_str # Result human readable string. ---- -int32 status_code #Status code. -string status_str # Status human readable string. diff --git a/action/ask_questions.action b/action/ask_questions.action index 8ab044c..7f58f22 100644 --- a/action/ask_questions.action +++ b/action/ask_questions.action @@ -4,23 +4,10 @@ uint8 SUCCESS=0 # Questionary successfully finished. uint8 QERR=1 # Error reading questionary. uint8 QNOTFINISHED=2 # Q. -##### Language code -uint8 ENGLISH=0 -uint8 CATALAN=1 -uint8 SPANISH=2 - -##### Tone/Sentiment code -uint8 HAPPY=1 -uint8 SAD=2 -uint8 NEUTRAL=3 - -string questionary_id #Questionary name. -string[] questions_id #Vector with the questions references to ask. If empty ask all. -string[] response_options #Vector with the answers -int32 language # language code -int32 tone # Tone code +iri_raadical_msgs/Speech speech bool get_answer # Bool to wait for an answer --- int32 return_code # Code after analizing the response. string return_msg # Optional returning msg to pass information to higher levels. --- +string feedback_status diff --git a/msg/Action.msg b/msg/Action.msg new file mode 100755 index 0000000..7e63cd3 --- /dev/null +++ b/msg/Action.msg @@ -0,0 +1,8 @@ +iri_raadical_msgs/Movement movement +iri_raadical_msgs/Speech speech +iri_raadical_msgs/Answer answer +iri_raadical_msgs/Screen screen +bool capture_emotion +bool capture_location +bool capture_pose +bool capture_answer diff --git a/msg/Activity.msg b/msg/Activity.msg new file mode 100755 index 0000000..3cfeb05 --- /dev/null +++ b/msg/Activity.msg @@ -0,0 +1,13 @@ +#### Activity code +uint8 TASKPS=0 # Task plan support. +uint8 DIMALERT=1 # Dimension alert. +uint8 SPECDATE=2 # Special date. +uint8 NEWFEED=3 # News feed. +uint8 SOCIALEV=4 # Social event. + +string id +int32 type +iri_raadical_msgs/Date date +string[] constraints + +iri_raadical_msgs/Action[] actions diff --git a/msg/Answer.msg b/msg/Answer.msg new file mode 100755 index 0000000..444dd49 --- /dev/null +++ b/msg/Answer.msg @@ -0,0 +1 @@ +string[] options \ No newline at end of file diff --git a/msg/Date.msg b/msg/Date.msg new file mode 100755 index 0000000..9d6154d --- /dev/null +++ b/msg/Date.msg @@ -0,0 +1,6 @@ + +int32 year +int32 month +int32 day +int32 hour +int32 minute \ No newline at end of file diff --git a/msg/Movement.msg b/msg/Movement.msg new file mode 100755 index 0000000..dd2ee50 --- /dev/null +++ b/msg/Movement.msg @@ -0,0 +1,21 @@ +#### Gesture code +uint8 ALIVE_1=0 +uint8 ALIVE_2=1 +uint8 ALIVE_3=2 +uint8 ALIVE_4=3 +uint8 ALIVE_5=4 +uint8 ALIVE_6=5 +uint8 ALIVE_7=6 +uint8 WAVE=7 +uint8 START_ARI=8 +uint8 BOW=9 +uint8 NOD=10 +uint8 SHAKE_LEFT=11 +uint8 SHAKE_RIGHT=12 +uint8 SHOW_LEFT=13 +uint8 SHOW_RIGHT=14 +uint8 LOOK_AROUND=15 +uint8 FLYING=16 + +int32 gesture # Desired robot gesture (Use string) +bool move # Flag to indicate if is desired to approach to the person \ No newline at end of file diff --git a/msg/Question.msg b/msg/Question.msg new file mode 100644 index 0000000..8d2b63e --- /dev/null +++ b/msg/Question.msg @@ -0,0 +1,2 @@ +string text +string[] options \ No newline at end of file diff --git a/msg/Screen.msg b/msg/Screen.msg new file mode 100755 index 0000000..1302353 --- /dev/null +++ b/msg/Screen.msg @@ -0,0 +1,4 @@ +string text +string image +string game +string[] options \ No newline at end of file diff --git a/msg/Speech.msg b/msg/Speech.msg new file mode 100755 index 0000000..cdd6d7f --- /dev/null +++ b/msg/Speech.msg @@ -0,0 +1,18 @@ +#### Language code +uint8 CATALAN=0 +uint8 ENGLISH=1 +uint8 SPANISH=2 + +#### Speaking mode code +uint8 NEUTRAL=0 +uint8 ANGER=1 +uint8 DISGUST=2 +uint8 FEAR=3 +uint8 HAPPINESS=4 +uint8 SADNESS=5 +uint8 SURPRISE=6 + + +string speaking_text +int32 language +int32 speaking_mode \ No newline at end of file diff --git a/srv/ScheduleActivity.srv b/srv/ScheduleActivity.srv new file mode 100755 index 0000000..7711f26 --- /dev/null +++ b/srv/ScheduleActivity.srv @@ -0,0 +1,11 @@ +# Service for scheduling an activity + +#### Language code +uint8 SUCCESS=0 +uint8 ERROR=1 +uint8 UNKNOWN=2 + +std_msgs/Header header +iri_raadical_msgs/Activity activity +--- +int32 result diff --git a/srv/SetAnswer.srv b/srv/SetAnswer.srv new file mode 100644 index 0000000..4eedae7 --- /dev/null +++ b/srv/SetAnswer.srv @@ -0,0 +1,6 @@ +# Service for scheduling an activity + +string question +string answer +--- +int32 result \ No newline at end of file diff --git a/srv/SetScreen.srv b/srv/SetScreen.srv new file mode 100644 index 0000000..f882d64 --- /dev/null +++ b/srv/SetScreen.srv @@ -0,0 +1,6 @@ +# Service for scheduling an activity + +std_msgs/Header header +iri_raadical_msgs/Screen screen +--- +int32 result diff --git a/srv/get_rooms_to_search.srv b/srv/get_rooms_to_search.srv deleted file mode 100644 index 97355e9..0000000 --- a/srv/get_rooms_to_search.srv +++ /dev/null @@ -1,7 +0,0 @@ -# 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