diff --git a/scripts/teleoperation.sh b/scripts/teleoperation.sh index 01f6268..5545c45 100755 --- a/scripts/teleoperation.sh +++ b/scripts/teleoperation.sh @@ -10,9 +10,9 @@ commands=( # Bringup Nao 'sleep 1;cd ~/catkin_ws;source devel/setup.bash ;roslaunch nao_bringup nao_full.launch ' # Start speech recognition server - 'sleep 3;cd ~/catkin_ws;source devel/setup.bash ;roslaunch nao_apps speech.launch' + 'sleep 4;cd ~/catkin_ws;source devel/setup.bash ;roslaunch nao_apps speech.launch' # Launch nodes in teleoperation package - 'sleep 5;cd ~/catkin_ws;source devel/setup.bash ;roslaunch teleoperation teleoperation.launch' + 'sleep 4;cd ~/catkin_ws;source devel/setup.bash ;roslaunch teleoperation teleoperation.launch' ) # Build final command with all the tabs to launch diff --git a/src/speech.cpp b/src/speech.cpp index 9e71c2f..14a5d3a 100644 --- a/src/speech.cpp +++ b/src/speech.cpp @@ -178,7 +178,9 @@ public: { //recognition has to be started and ended once a valid command was found - initializeVocabulary(); + this->initializeVocabulary(); + ros::Rate loop_rate(1); + loop_rate.sleep(); std_srvs::Empty srv; if (recog_start_srv.call(srv)) { @@ -194,7 +196,8 @@ int main(int argc, char** argv) { ros::init(argc, argv, "speech"); Nao_control TermiNAOtor; - ros::Rate loop_rate(0.5); + //TermiNAOtor.initializeVocabulary(); + ros::Rate loop_rate(1); loop_rate.sleep(); TermiNAOtor.commandRecognition(); ROS_INFO("SPIN");