Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Roslaunch got a 'No such file or directory' error

Dear Community,

Here is a bug I've been trying to debug for hours. I was following tutorial from the book "ROS robotics projects" to build a chatbot with python AIML package.

Here is the link to my source code:

Here are the steps I have been following:

  • I initialized workspace in the ./src folder under root folder (which is named cb in this case)
  • I build the workspace in the root folder.
  • I go back to the ./src folder and created a package named "ros_aiml" there.
  • Within package "ros_aiml", I have the following files - which you could inspect in the github..

Files include 1) data, 2) source code and 3) launch files.

Data are in the data folder, which contains pre-downloaded rules for answering questions.

Regarding source code in the ./src folder, there are four files: 1) 2) 3) aiml_tts_client and 4) aiml_speech_recognition_client. They are organized around two topics:

  • /chatter: aiml_client and aiml_speech_recognition_client both publish to this topic. the former will wait for user input and then publish, while the latter will translate user's speech into text and then publish. In both cases, the content is user input which is a question. aiml_server subscribes to this topic.
  • /response: aiml_server publishes to this topic. the content is the answer to the user input question. aiml_tts_client subscribes to this topic, which will later translate the text to speech.

Launch files:

  1. start_chat.launch will launch the aiml_server and aiml_client nodes.
  2. start_tts_chat.launch will launch the aiml_server, aiml_client and aiml_tts nodes. This is an upgrade of the first launch file as it will translate the answer text into speech.
  3. start_speech_chat.launch will launch the aiml_server, aiml_tts_client, aiml_speech recognition nodes.

So my problem is, when trying to run `roslaunch ros_aiml start_chat.launch", I got this error. What went wrong? I did chmod u+x all the executable .py and .launch files.

yuqiong@yuqiong-G7-7588:/media/yuqiong/DATA/rosproj/cb/src/ros_aiml$ roslaunch ros_aiml start_chat.launch
... logging to /home/yuqiong/.ros/log/e5a30fd0-eacb-11e8-a856-645d867d07a8/roslaunch-yuqiong-G7-7588-12518.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
started roslaunch server http://yuqiong-G7-7588:40753/

 * /aiml_path: /media/yuqiong/DA...
 * /rosdistro: kinetic

 * /rosversion: 1.12.14

    aiml_client (ros_aiml/
    aiml_server (ros_aiml/
auto-starting new master
process[master]: started with pid [12528]

setting /run_id to e5a30fd0-eacb-11e8-a856-645d867d07a8
process[rosout-1]: started with pid [12541]
started core service [/rosout]
process[aiml_server-2]: started with pid [12548]
Roslaunch got a 'No such file or directory' error while attempting to run:

/media/yuqiong/DATA/rosproj/cb/src/ros_aiml/src/ __name:=aiml_client __log:=/home/yuqiong/.ros/log/e5a30fd0-eacb-11e8-a856-645d867d07a8/aiml_client-3.log

Please make sure that all the executables in this command exist and have

executable permission. This is often caused by a bad launch-prefix.
The traceback for the exception was written to the log file
[aiml_client-3] killing on exit
[aiml_server-2] killing on exit
Traceback (most recent call last):
  File "/media/yuqiong/DATA/rosproj/cb/src/ros_aiml/src/", line 5, in <module>
    import rospy
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/", line 49, in <module>
    from .client import spin, myargv, init_node, \
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/", line 54, in <module>
    import rospy.core
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/", line 60, in <module>
    import xmlrpc.client as xmlrpcclient #Python 3.x
[rosout-1] killing on exit
[master] killing on exit