0
$\begingroup$

Rosanswers logo

I've gone through the previous tutorials and am now having a problem with running the server. After entering "rosrun beginner_tutorials add_two_ints_server.py" in the commmand line, I'm receiving the following error:

...
line 4, in <module>
    from beginner_tutorials.srv import *
ImportError: No module named beginner_tutorials.srv

Originally posted by wkr101 on ROS Answers with karma: 63 on 2011-07-19

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

That tutorial assumes that you have completed these tutorials:

http://www.ros.org/wiki/ROS/Tutorials/CreatingPackage

and

 http://www.ros.org/wiki/ROS/Tutorials/CreatingMsgAndSrv

If you have not completed these tutorials the beginner_tutorials package will not exist nor will beginner_tutorials.srv.


Originally posted by mmwise with karma: 8372 on 2011-07-19

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by dornhege on 2011-07-19:
Also it should read "from beginner_tutorials import *".

$\endgroup$
0
$\begingroup$

Rosanswers logo

Hi, I had the same Problem. Solution for me was, as dornhege already gave a hint to http://www.ros.org/wiki/ROS/Tutorials/CreatingMsgAndSrv.

Open CMakeLists.txt in the beginner_tutorial directory (roscd beginner_tutorials/) in your favorite text editor. Remove # to uncomment the following line:

#rosbuild_genmsg()

and

#rosbuild_gensrv()

After removing the # it worked for me.

Cheers


Originally posted by pwo with karma: 1 on 2011-07-25

This answer was NOT ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.