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

SMACH tutorial: ImportError: No module named msg

asked 2012-09-18 10:23:42 -0500

this post is marked as community wiki

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

I got error while trying to run the ./examples/state_machine.py in smach_tutorials package

Traceback (most recent call last): File "/home/tienthanh/workspace/ros/fuerte/mebios/tienthanh/executive_smach_tutorials/smach_tutorials/examples/state_machine.py", line 21, in <module> import smach_ros File "/opt/ros/fuerte/stacks/executive_smach/smach_ros/src/smach_ros/__init__.py", line 55, in <module> from action_server_wrapper import ActionServerWrapper File "/opt/ros/fuerte/stacks/executive_smach/smach_ros/src/smach_ros/action_server_wrapper.py", line 9, in <module> from actionlib.simple_action_server import SimpleActionServer File "/home/tienthanh/workspace/ros/fuerte/mebios/tienthanh/executive_smach_tutorials/smach_tutorials/examples/actionlib.py", line 27, in <module> from actionlib.msg import * ImportError: No module named msg

Output of "echo $PYTHONPATH" is /opt/ros/fuerte/share/ros/core/roslib/src:/opt/ros/fuerte/lib/python2.7/dist-packages:

I use ROS fuerte, Ubuntu 12.04 32 bit.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-09-18 10:53:31 -0500

this post is marked as community wiki

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

It looks like the tutorial was never updated when actionlib.

The line should read:

from actionlib_msgs.msg import *

I've filed a ticket here: https://kforge.ros.org/smach/trac/ticket/2

edit flag offensive delete link more

Comments

I change in smach_tutorials/examples/actionlib.py as you advice: from actionlib_msgs.msg import *

But I got another error: ... action_server_wrapper.py", line 9, in <module> from actionlib.simple_action_server import SimpleActionServer ImportError: No module named simple_action_server

Tien Thanh gravatar image Tien Thanh  ( 2012-09-19 02:50:02 -0500 )edit
7

answered 2012-10-05 04:36:41 -0500

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 when I try to run the ./examples/state_machine.py in smach_tutorials package ...

There is a file called examples/actionlib.py in the same folder. Rename the file actionlib.py to actionlib1.py and delete the file actionlib.pyc.

With that change I could run all the tutorial examples.

edit flag offensive delete link more

Comments

Great! This work for me, thanks !

Jbot gravatar image Jbot  ( 2014-08-01 06:50:02 -0500 )edit

Question Tools

Stats

Asked: 2012-09-18 10:23:42 -0500

Seen: 1,718 times

Last updated: Oct 05 '12