From cab532bf41c705723bf295c3c9ae83b30211f0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20=C5=81ukawski?= Date: Thu, 31 Aug 2023 22:25:32 +0200 Subject: [PATCH] Rename IDL libraries (drop suffix) --- .../SelfPresentationCommands.thrift | 2 +- programs/BodyExecution/BodyExecution.hpp | 4 ++-- programs/DialogueManager/DialogueManager.cpp | 10 +++++----- programs/DialogueManager/DialogueManager.hpp | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/libraries/SelfPresentationCommandsIDL/SelfPresentationCommands.thrift b/libraries/SelfPresentationCommandsIDL/SelfPresentationCommands.thrift index e471f80..e57f719 100644 --- a/libraries/SelfPresentationCommandsIDL/SelfPresentationCommands.thrift +++ b/libraries/SelfPresentationCommandsIDL/SelfPresentationCommands.thrift @@ -1,6 +1,6 @@ namespace yarp roboticslab -service SelfPresentationCommandsIDL +service SelfPresentationCommands { oneway void doGreet(); oneway void doHoming(); diff --git a/programs/BodyExecution/BodyExecution.hpp b/programs/BodyExecution/BodyExecution.hpp index 9a37e68..075de3f 100644 --- a/programs/BodyExecution/BodyExecution.hpp +++ b/programs/BodyExecution/BodyExecution.hpp @@ -16,7 +16,7 @@ #include #include -#include "SelfPresentationCommandsIDL.h" +#include "SelfPresentationCommands.h" namespace roboticslab { @@ -26,7 +26,7 @@ namespace roboticslab * @brief Body Execution core. */ class BodyExecution : public yarp::os::RFModule, - public SelfPresentationCommandsIDL + public SelfPresentationCommands { public: using setpoints_head_t = std::array; diff --git a/programs/DialogueManager/DialogueManager.cpp b/programs/DialogueManager/DialogueManager.cpp index ca6af1b..6e2868d 100644 --- a/programs/DialogueManager/DialogueManager.cpp +++ b/programs/DialogueManager/DialogueManager.cpp @@ -77,7 +77,7 @@ bool DialogueManager::configure(yarp::os::ResourceFinder & rf) return false; } - speech.yarp().attachAsClient(speechPort); + tts.yarp().attachAsClient(speechPort); motion.yarp().attachAsClient(motionPort); if (language == "english") @@ -165,7 +165,7 @@ bool DialogueManager::close() bool DialogueManager::threadInit() { - if (!speech.setLanguage(voice)) + if (!tts.setLanguage(voice)) { yError() << "Unable to set voice to" << voice; return false; @@ -176,7 +176,7 @@ bool DialogueManager::threadInit() void DialogueManager::threadRelease() { - if (!speech.stop()) + if (!tts.stop()) { yWarning() << "Unable to stop speech"; } @@ -279,7 +279,7 @@ void DialogueManager::speak(const std::string & sentenceId) { yInfo() << sentenceId << "->" << sentences[sentenceId]; - if (!speech.say(sentences[sentenceId])) + if (!tts.say(sentences[sentenceId])) { yWarning() << "Unable to say" << sentenceId; } @@ -296,7 +296,7 @@ void DialogueManager::awaitSpeechCompletion() yarp::os::SystemClock::delaySystem(0.1); } - while (speechPort.getOutputCount() > 0 && !speech.checkSayDone()); + while (speechPort.getOutputCount() > 0 && !tts.checkSayDone()); } void DialogueManager::awaitMotionCompletion() diff --git a/programs/DialogueManager/DialogueManager.hpp b/programs/DialogueManager/DialogueManager.hpp index 587a17f..5e7bb16 100644 --- a/programs/DialogueManager/DialogueManager.hpp +++ b/programs/DialogueManager/DialogueManager.hpp @@ -11,9 +11,9 @@ #include #include -#include +#include -#include "SelfPresentationCommandsIDL.h" +#include "SelfPresentationCommands.h" namespace roboticslab { @@ -45,8 +45,8 @@ class DialogueManager : public yarp::os::RFModule, void awaitMotionCompletion(); void awaitSpeechAndMotionCompletion(); - TextToSpeechIDL speech; - SelfPresentationCommandsIDL motion; + SpeechSynthesis tts; + SelfPresentationCommands motion; yarp::os::RpcClient speechPort; yarp::os::RpcClient motionPort;