did some work to assemble it together

This commit is contained in:
Pavel Lutskov
2019-01-28 17:34:55 +01:00
parent dc88c5259b
commit 2d0441306a
6 changed files with 76 additions and 38 deletions

View File

@@ -98,7 +98,7 @@ public:
}
//set pause duration
double f_pause = 1;
double f_pause = 2;
if (recog_stop_srv.call(srv) && ((msg->words.size())> 0)) {
@@ -110,7 +110,7 @@ public:
if (msg->confidence_values[0] > 0.35) {
ROS_INFO("SPEECH STARTING");
std::string say = "Ok I understood";
std::string say = "Ok I understood " + msg->words[0];
naoqi_bridge_msgs::SpeechWithFeedbackActionGoal s_msg;
s_msg.goal_id.id = int_to_str(this->speech_id_ctr);
@@ -121,11 +121,13 @@ public:
ic_msg.request.module = "speech_recognition";
if (msg->words[0] == "imitate") {
ic_msg.request.message = "imitate";
ROS_INFO("SPEECH: REQUESTING IMITATION");
if (this->ic.call(ic_msg) && ic_msg.response.permission) {
this->imitating = true;
}
}
else if (msg->words[0] == "stop") {
ROS_INFO("SPEECH: REQUESTING STOP IMITATION");
ic_msg.request.message = "stop";
if (this->ic.call(ic_msg) && ic_msg.response.permission) {
this->imitating = false;