31 from actionlib_msgs.msg
import GoalStatus
32 from actionlib
import SimpleActionClient
33 from actionlib.msg
import TestAction, TestGoal
40 self.assert_(client.wait_for_server(rospy.Duration(10.0)),
41 'Could not connect to the action server')
44 client.send_goal(goal)
45 self.assert_(client.wait_for_result(rospy.Duration(10.0)),
47 self.assertEqual(GoalStatus.SUCCEEDED, client.get_state())
48 self.assertEqual(
"The ref server has succeeded", client.get_goal_status_text())
51 client.send_goal(goal)
52 self.assert_(client.wait_for_result(rospy.Duration(10.0)),
54 self.assertEqual(GoalStatus.ABORTED, client.get_state())
55 self.assertEqual(
"The ref server has aborted", client.get_goal_status_text())
58 if __name__ ==
'__main__':
60 rospy.init_node(
'simple_python_client_test')
61 rostest.rosrun(
'actionlib',
'test_simple_action_client_python', TestSimpleActionClient)
A Simple client implementation of the ActionInterface which supports only one goal at a time...