def execute_cb(self, goal): i=0 for commands in goal: i += 1 action = goal.action loc = goal.location it = goal.item pers = goal.person printNewGoal(action, it, pers, loc, i) for i in xrange(1, goal.order): # check that preempt has not been requested by the client if self._as.is_preempt_requested(): rospy.loginfo('%s: Preempted' % self._action_name) self._as.set_preempted() success = False break
def execute(self, userdata): i = 1 for o in userdata.i_orderList: printNewGoal(o.action, o.item, o.person, o.location, i) i += 1 return succeeded