Calling Actions from Smach
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
Are you importing the GoturtleAction?