ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Tutorial 15 - ExaminingServiceClient(python)

asked 2011-07-19 05:37:07 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

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
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2011-07-19 05:43:37 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

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.

edit flag offensive delete link more

Comments

Also it should read "from beginner_tutorials import *".
dornhege gravatar image dornhege  ( 2011-07-19 06:42:28 -0600 )edit
2

answered 2011-07-25 03:32:15 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

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

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-07-19 05:37:07 -0600

Seen: 1,360 times

Last updated: Jul 25 '11