Robotics StackExchange | Archived questions

roslaunch error: ERROR: cannot launch node of type

Hi all,

I am a beginner to ROS (Indigo and a 14.04 Ubuntu machine) and as a project, I tried to use Pocketsphinx (https://github.com/mikeferguson/pocketsphinx) to set a 2D nav goal in RVIZ for a turtlebot simulator. However, when I try launching using roslaunch pocketsphinx goto.launch it gives an error: ERROR: cannot launch node of type [pocketsphinx/goto.py]: can't locate node [goto.py] in package [pocketsphinx]

I have already sourced devel/setup.bash and devel/setup.sh and have done catkin_make

For the python program, goto.py (located at catkin_ws/src/pocketsphinx/nodes folder), I largely based it off of this: https://github.com/mikeferguson/maxwell/blob/sixdof/maxwell_navigation/nodes/goto.py

I then proceeded to make a launch file (located at catkin_ws/src/pocketsphinx/demo folder):

<launch>
<node name="recognizer" pkg="pocketsphinx" type="recognizer.py">
    <param name="lm" value="$(find pocketsphinx)/demo/goto.lm"/>
    <param name="dict" value="$(find pocketsphinx)/demo/goto.dic"/>
  </node>
<node name="goto" pkg="pocketsphinx" type="goto.py" output="screen">
    <remap from="cmd_vel" to="/mobile_base/commands/velocity"/>
  </node>
</launch>

If anyone could tell me what I am doing wrong, it would be great!

Thanks, Rithvik

Asked by Rithvik.Chuppala on 2016-08-14 02:36:03 UTC

Comments

Does your goto.py have the execute permission set?

Asked by ahendrix on 2016-08-14 12:07:00 UTC

goto.py does not have execute permission set. I changed it and it works now! Thank you very much! :)

Asked by Rithvik.Chuppala on 2016-08-14 13:14:55 UTC

Answers

As ahendrix suggested, goto.py didn't have execute permission set. To set execute permission I used: chmod +x ./goto.py. Now it seems to working fine!

Asked by Rithvik.Chuppala on 2016-08-14 13:20:54 UTC

Comments

Where did you get the files goto.lm and goto.dic? I am using your question as a guide to get pocketsphinx running. I'm on 14.04 but with Jade. Any help really appreciated.

Asked by billy on 2016-08-16 00:32:36 UTC