7 Creates the action servers the example tasks require.
9 def __init__(self, expected_action_duration=rospy.Duration(1)):
11 self.
task_server = actionlib.SimpleActionServer(
'test_task', TestExecutionAction, execute_cb = self.
execute, auto_start =
False)
14 print 'called with goal %s'%goal.some_goal_string
17 while not rospy.is_shutdown()
and rospy.get_rostime() < target
and not self.task_server.is_preempt_requested():
20 if self.task_server.is_preempt_requested():
21 print "done preempted"
22 self.task_server.set_preempted()
25 self.task_server.set_succeeded()
28 self.task_server.start()