From e1c7e4c91f6f44ef80c25d5d22119043d4f73405 Mon Sep 17 00:00:00 2001 From: Sergi Hernandez Juan <shernand@iri.upc.edu> Date: Tue, 28 May 2024 09:24:42 +0200 Subject: [PATCH] Leitat changes. --- CMakeLists.txt | 10 +++++++++- action/Listen.action | 10 ++++++++++ action/PostActivityResult.action | 18 ++++++++++++++++++ action/RequestActivity.action | 7 +++++++ action/ScreenControl.action | 12 ++++++++++++ action/UserDetected.action | 13 +++++++++++++ package.xml | 1 + srv/SaySpeech.srv | 7 +++++++ srv/TextToSpeech.srv | 11 +++++++++++ 9 files changed, 88 insertions(+), 1 deletion(-) create mode 100755 action/Listen.action create mode 100644 action/PostActivityResult.action create mode 100644 action/RequestActivity.action create mode 100644 action/ScreenControl.action create mode 100644 action/UserDetected.action create mode 100644 srv/SaySpeech.srv create mode 100644 srv/TextToSpeech.srv diff --git a/CMakeLists.txt b/CMakeLists.txt index 37144dd..5bf67cb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ find_package(catkin REQUIRED COMPONENTS sensor_msgs actionlib_msgs message_generation + audio_common_msgs std_msgs ) @@ -72,6 +73,8 @@ add_service_files( ScheduleActivity.srv SetAnswer.srv SetScreen.srv + TextToSpeech.srv + SaySpeech.srv ) ## Generate actions in the 'action' folder @@ -82,12 +85,17 @@ add_action_files( ExecuteAction.action ExecuteActivity.action Speak.action + Listen.action + UserDetected.action + PostActivityResult.action + ScreenControl.action + RequestActivity.action ) ## Generate added messages and services with any dependencies listed here generate_messages( DEPENDENCIES - geometry_msgs sensor_msgs actionlib_msgs std_msgs + geometry_msgs sensor_msgs actionlib_msgs audio_common_msgs std_msgs ) ################################################ diff --git a/action/Listen.action b/action/Listen.action new file mode 100755 index 0000000..9c2363d --- /dev/null +++ b/action/Listen.action @@ -0,0 +1,10 @@ +# Action to listen to user's speech + +int32 duration # How long it should listen +--- +string transcription # Transcribed text from captured audio +--- +string feedback_status + + + diff --git a/action/PostActivityResult.action b/action/PostActivityResult.action new file mode 100644 index 0000000..c2fdb6a --- /dev/null +++ b/action/PostActivityResult.action @@ -0,0 +1,18 @@ +# goal definition +string idactivity +bool result +string answer +string pose +string emotion +string location +string api_url + +--- + +# result definition +bool result +int32 error_code + +--- + +# feedback diff --git a/action/RequestActivity.action b/action/RequestActivity.action new file mode 100644 index 0000000..f4d5366 --- /dev/null +++ b/action/RequestActivity.action @@ -0,0 +1,7 @@ +string url +string user_id +string device_id +--- +iri_raadical_msgs/Activity activity +--- +string feedback_status \ No newline at end of file diff --git a/action/ScreenControl.action b/action/ScreenControl.action new file mode 100644 index 0000000..c08e077 --- /dev/null +++ b/action/ScreenControl.action @@ -0,0 +1,12 @@ +#goal definition +iri_raadical_msgs/Screen screen + +--- + +#result definition +string answer + +--- + +#feedback +string feedback diff --git a/action/UserDetected.action b/action/UserDetected.action new file mode 100644 index 0000000..953877e --- /dev/null +++ b/action/UserDetected.action @@ -0,0 +1,13 @@ +#goal definition +string userid +string api_url + +--- + +#result definition +bool result +int32 error_code + +--- + +#feedback diff --git a/package.xml b/package.xml index c1dbea5..c259a8c 100644 --- a/package.xml +++ b/package.xml @@ -62,6 +62,7 @@ <exec_depend>std_msgs</exec_depend> <exec_depend>sensor_msgs</exec_depend> <exec_depend>geometry_msgs</exec_depend> + <depend>audio_common_msgs</depend> <!-- The export tag contains other, unspecified, tags --> diff --git a/srv/SaySpeech.srv b/srv/SaySpeech.srv new file mode 100644 index 0000000..cfd8129 --- /dev/null +++ b/srv/SaySpeech.srv @@ -0,0 +1,7 @@ +audio_common_msgs/AudioData data +bool blocking + # True: srv responds once the audio has finished playing + # False: responds as soon as possible (the audio is still playing) +--- +bool success # Whether it has been played successfully + diff --git a/srv/TextToSpeech.srv b/srv/TextToSpeech.srv new file mode 100644 index 0000000..6391b11 --- /dev/null +++ b/srv/TextToSpeech.srv @@ -0,0 +1,11 @@ +string text +bool blocking + # True: srv responds once the audio has finished playing + # False: responds as soon as possible (the audio is still playing) +int32 emotion + # 0: neutro + # 1: felicidad + # 2: tristeza + # 3: enfado +--- +string result \ No newline at end of file -- GitLab