0
$\begingroup$

Rosanswers logo

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 import smach_ros File "/opt/ros/fuerte/stacks/executive_smach/smach_ros/src/smach_ros/init.py", line 55, in 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 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 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.


Originally posted by Tien Thanh on ROS Answers with karma: 231 on 2012-09-18

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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


Originally posted by jbohren with karma: 5809 on 2012-09-18

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by Tien Thanh on 2012-09-19:
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 from actionlib.simple_action_server import SimpleActionServer ImportError: No module named simple_action_server

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by MKnight with karma: 51 on 2012-10-05

This answer was NOT ACCEPTED on the original site

Post score: 7


Original comments

Comment by Jbot on 2014-08-01:
Great! This work for me, thanks !

$\endgroup$

Your Answer

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