Writing a Simple Service and Client (Python) No File or Directory Found Error
I have been running throught the Simple Service and Client tutorial (python) and everything seems fine until I run the rosrun beginnertutorial addtwoints(client/_server).py command. I get ": No file or directory found" error.
I see the comment in the tutorial:
"We use CMake as our build system and, yes, you have to use it even for Python nodes." Assuming that the command that follow would take care of this I believe that this is done.
The files are in the advised directory and are executable (as there is a checkmark in the boxes indicating this in the file properties).
Is that somewhere else that I could check to ensure the rosrun can "see" these files?
PC OS: Unbuntu 14.04 ROS: Indigo
Asked by Derkabub on 2015-06-17 13:27:33 UTC
Answers
The output of rospack:
Full tree crawl took 0.053591 seconds. Directories marked with (*) contain no manifest. You may
want to delete these directories. To get just of list of directories without manifests,
re-run the profile with --zombie-only
0.041185 /opt/ros/indigo/share
0.010218 /home/derkabub/catkin_ws
0.007243 * /home/derkabub/catkin_ws/devel
0.002643 * /home/derkabub/catkin_ws/devel/share
0.002243 * /home/derkabub/catkin_ws/devel/lib
0.002004 /home/derkabub/catkin_ws/src
0.001699 * /home/derkabub/catkin_ws/devel/lib/python2.7
0.001608 * /home/derkabub/catkin_ws/devel/share/common-lisp
0.001405 * /home/derkabub/catkin_ws/devel/lib/python2.7/dist-packages
0.001353 * /home/derkabub/catkin_ws/devel/share/common-lisp/ros
0.001038 * /home/derkabub/catkin_ws/devel/share/common-lisp/ros/beginner_tutorials
0.000778 * /home/derkabub/catkin_ws/devel/lib/python2.7/dist-packages/beginner_tutorials
0.000751 * /home/derkabub/catkin_ws/devel/etc
0.000569 * /home/derkabub/catkin_ws/devel/share/beginner_tutorials
0.000498 * /home/derkabub/catkin_ws/devel/include
0.000477 * /home/derkabub/catkin_ws/devel/etc/catkin
0.000184 * /home/derkabub/catkin_ws/devel/share/beginner_tutorials/cmake
0.000160 * /home/derkabub/catkin_ws/devel/share/common-lisp/ros/beginner_tutorials/srv
0.000139 * /home/derkabub/catkin_ws/devel/share/common-lisp/ros/beginner_tutorials/msg
0.000130 * /home/derkabub/catkin_ws/devel/include/beginner_tutorials
The package does show up in the rospack list-names.
I can see the package in the include directory but not the lib directory in devel under catkin_ws.
Asked by Derkabub on 2015-06-25 13:43:55 UTC
Comments
I attempted the tutorial at: http://wiki.ros.org/rospy_tutorials/Tutorials/Makefile as I thought the issue was something to do with this tutorial. This did not work. returned the error that there were no files specified in add_message_files in CMakeLists.txt. I would really appreciate help.
Asked by Derkabub on 2015-06-23 13:12:12 UTC
Have you sourced the setup (
. devel/setup.bash
) file after callingcatkin_make
and before callingrosrun
?Asked by Dirk Thomas on 2015-06-24 12:10:04 UTC
I just tried that with the following commends:
(after starting roscore and cd ~/catkin_ws)
catkin_make
source devel/setup.bash
rosrun beginner_tutorials add_two_ints_client.py
I still got ": No such file or directory"
Sorry so spelled out but I am fairly new to both Ubuntu and ROS. Thanks!
Asked by Derkabub on 2015-06-25 12:09:36 UTC
What does
rospack profile
output? Is your package in the list ofrospack list-names
? Can you check the content of the devel space: e.g.devel/lib/beginner_tutorial
?Asked by Dirk Thomas on 2015-06-25 12:31:25 UTC
Sorry if this doesn't conform to convention but my response did not fit in the comment had to put in the answer field. Please read the next answer for my response.
Thanks!
Asked by Derkabub on 2015-06-25 13:44:56 UTC
I did go back and run the Talker Listener tutorial and that ran fine. The .py files are all in scripts in the recommended directory structure.
Asked by Derkabub on 2015-06-30 12:51:22 UTC