Example #1
0
 def bagger_dump(self):
     """Call online_bagger/dump service"""
     if self.first:
         return
     if 'BAG_ALWAYS' not in os.environ or 'bag_kill' not in os.environ:
         rospy.logwarn('BAG_ALWAYS or BAG_KILL not set. Not making kill bag.')
         return
     goal = BagOnlineGoal(bag_name='kill.bag')
     goal.topics = os.environ['BAG_ALWAYS'] + ' ' + os.environ['bag_kill']
     self.bag_client.send_goal(goal, done_cb=self._bag_done_cb)
Example #2
0
 def bagger_dump(self):
     """Call online_bagger/dump service"""
     if self.first:
         return
     if 'BAG_ALWAYS' not in os.environ or 'bag_kill' not in os.environ:
         rospy.logwarn(
             'BAG_ALWAYS or BAG_KILL not set. Not making kill bag.')
         return
     goal = BagOnlineGoal(bag_name='kill.bag')
     goal.topics = os.environ['BAG_ALWAYS'] + ' ' + os.environ['bag_kill']
     self.bag_client.send_goal(goal, done_cb=self._bag_done_cb)
Example #3
0
 def raised(self, alarm):
     self._killed = True
     if self.first:
         self.first = False
         return
     if 'BAG_ALWAYS' not in os.environ or 'bag_kill' not in os.environ:
         rospy.logwarn('BAG_ALWAYS or BAG_KILL not set. Not making kill bag.')
         return
     goal = BagOnlineGoal(bag_name='kill.bag')
     goal.topics = os.environ['BAG_ALWAYS'] + ' ' + os.environ['bag_kill']
     self.bag_client.send_goal(goal, done_cb=self._online_bagger_cb)
Example #4
0
File: kill.py Project: uf-mil/mil
 def raised(self, alarm):
     self._killed = True
     if self.first:
         self.first = False
         return
     if 'BAG_ALWAYS' not in os.environ or 'bag_kill' not in os.environ:
         rospy.logwarn('BAG_ALWAYS or BAG_KILL not set. Not making kill bag.')
     else:
         goal = BagOnlineGoal(bag_name='kill.bag')
         goal.topics = os.environ['BAG_ALWAYS'] + ' ' + os.environ['bag_kill']
         self.bag_client.send_goal(goal, done_cb=self._online_bagger_cb)
     self.task_client.run_mission('Killed', done_cb=self._kill_task_cb)
Example #5
0
 def __init__(self, name='', topics='', time=0.0):
     self.client = SimpleActionClient(OnlineBagger.BAG_TOPIC,
                                      BagOnlineAction)
     self.goal = BagOnlineGoal(bag_name=name, topics=topics, bag_time=time)
     self.result = None
     self.total_it = 0