Calling Actions from Smach

asked 2014-07-28 05:07:57 -0500

Arun gravatar image

I have a action server running named /goturtleserver which implements the GoturtleAction (C++) I want to call this from smach state machine.

Here is the code i used to calling the actionserver smach.StateMachine.add('GOAL_DEFAULT', smach_ros.SimpleActionState('goturtleserver', GoturtleAction),{'succeeded':'succeeded'})

I have the following error:

[ERROR] [WallTime: 1406540355.096908] Error raised during SMACH container construction: Traceback (most recent call last):

File "/home/arun/ros_workspace/src/ensta_turtlebot/scripts/state_machine_simple.py", line 23, in main smach_ros.SimpleActionState('goturtleserver', GoturtleAction),{'succeeded':'succeeded'})

NameError: global name 'GoturtleAction' is not defined

Any help much appreciated

edit retag flag offensive close merge delete

Comments

1

Are you importing the GoturtleAction?

BennyRe gravatar image BennyRe  ( 2014-07-28 06:03:29 -0500 )edit