标签:终端 ima rename os包 通过 ubuntu14 使用 system type
搭建环境:XMWare Ubuntu14.04 ROS(indigo)
转载自古月居 转载连接:http://www.guyuehome.com/260
1 $ sudo apt-get install gstreamer0.10-pocketsphinx 2 $ sudo apt-get install ros-indigo-audio-common 3 $ sudo apt-get install libasound2
安装ROS包:
sudo apt-get install ros-indigo-pocketsphinx
2、测试
roslaunch pocketsphinx robocup.launch
运行后,会出现下面的错误:
1 [recognizer-1] process has died [pid 25379, exit code 1, cmd /opt/ros/indigo/lib/pocketsphinx/recognizer.py __name:=recognizer __log:=/home/l/.ros/log/827f0fd0-2ff1-11e7-90b9-000c296e5c8e/recognizer-1.log]. 2 log file: /home/l/.ros/log/827f0fd0-2ff1-11e7-90b9-000c296e5c8e/recognizer-1*.log
纠正上述错误:在终端输入:
sudo apt-get install gstreamer0.10-gconf
注释掉:/opt/ros/indigo/lib/pocketsphinx/recognizer.py
#self.asr.set_property(‘configured‘, True)
首先看看例子中要添加的文本信息:
1 $ roscd rbx1_speech/config 2 $ more nav_commands.txt
把下载的文件都解压放在rbx1_speech包的config文件夹下。我们可以给这些文件改个名字:
1 $ roscd rbx1_speech/config 2 $ rename -f ‘s/3026/nav_commands/‘ *
在rbx1_speech/launch文件夹下看看voice_nav_commands.launch这个文件:
1 <launch> 2 <node name="recognizer" pkg="pocketsphinx" type="recognizer.py" 3 output="screen"> 4 <param name="lm" value="$(find rbx1_speech)/config/nav_commands.lm"/> 5 <param name="dict" value="$(find rbx1_speech)/config/nav_commands.dic"/> 6 </node> 7 </launch>
通过之前的命令来测试一下效果
1 $ roslaunch rbx1_speech voice_nav_commands.launch 2 $ rostopic echo /recognizer/output
Robot Operating System (ROS)学习笔记4---语音控制
标签:终端 ima rename os包 通过 ubuntu14 使用 system type
原文地址:http://www.cnblogs.com/LQLin168/p/6803580.html