timing optimization

This commit is contained in:
HRS_D
2019-01-24 12:00:12 +01:00
parent a52b56ded9
commit df516e8664
2 changed files with 7 additions and 4 deletions

View File

@@ -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

View File

@@ -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");