Ask Your Question

ImportError: No module named msg

asked 2012-03-27 02:03:18 -0500

fangyi gravatar image

updated 2014-01-28 17:11:45 -0500

ngrennan gravatar image

Hey, I'm a new ROS user and tried to use actionlib. I created a new package 'tuck_arms_server' and defined the message in .action file. After compiling the package, the msg folder is automatically created. But then my python code, I wanted to do this: "import from tuck_arms_server.msg import *", but I got the error: ImportError: No module named msg.

some relevant lines in my code: import roslib; roslib.load_manifest('tuck_arms_server');

in CMakeLists.txt:(just followed the tutorial)


also added this line to the manifest file:

<depend package="actionlib_msgs"/>

So why cant it recognize msg in my package tuck_arms_server ? Thanks in advance.:-)

edit retag flag offensive close merge delete



You wrote "import from tuck_arms_server import *", which is not valid Python. Is that what you meant? (If not, you should probably edit the question)

Mac gravatar image Mac  ( 2012-04-09 09:35:00 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-05-26 07:46:25 -0500

this post is marked as community wiki

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

@Mac is right: Your import syntax is incorrect. Please see the rospy tutorials for correct syntax.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2012-03-27 02:03:18 -0500

Seen: 2,023 times

Last updated: May 26 '12