voice_system_stop 637 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. # Copyright: 2016-2018 ROS小课堂 www.corvin.cn
  3. # Author: corvin
  4. # Description: Stop voice system ros node.
  5. # History:
  6. # 20181129: initial this bash file.
  7. source /opt/ros/kinetic/setup.bash
  8. pid=`ps -ef|grep voice_bringup.launch|grep -v grep|awk '{print $2}'`
  9. if [ -n "$pid" ]
  10. then
  11. rosnode kill /iflytek_asr_node
  12. rosnode kill /iflytek_tts_node
  13. rosnode kill /pocketSphinx_recognizer_node
  14. rosnode kill /save_response_node
  15. rosnode kill /sphinx_wakeup_node
  16. rosnode kill /tuling_nlu_node
  17. rosnode kill /voice_move_node
  18. echo "kill voice system bringup pid:" $pid
  19. kill -9 $pid
  20. fi
  21. exit 0