Go to the documentation of this file.00001
00002
00003
00004 import rospy
00005 from bt_action import BTAction
00006
00007
00008 class Start(BTAction):
00009
00010 def __init__(self):
00011 self.condition = true
00012
00013 super(Start, self).__init__('Start')
00014
00015 def execute_cb(self, goal):
00016 while not rospy.is_shutdown():
00017 if self._as.is_preempt_requested():
00018 rospy.loginfo("{} halted".format(self._action_name))
00019 self._as.set_preempted()
00020 self.set_status(False)
00021 break
00022 if condition:
00023 self.set_status(True)
00024 else:
00025 self.set_status(False)