def save_all_data(self):
     save_data(
         self.all_coverage_data,
         '{}/coverage_{}_{}_{}_{}.pickle'.format(self.method,
                                                 self.environment,
                                                 self.robot_count, self.run,
                                                 self.termination_metric))
示例#2
0
    def save_all_data(self, data):
        save_data(
            self.all_coverage_data, '{}/coverage_{}_{}_{}_{}_{}.pickle'.format(
                self.method, self.environment, self.robot_count, self.run,
                self.termination_metric, self.max_target_info_ratio))
        count = self.robot_count
        if self.method == 'recurrent_connectivity':
            count += 1

        sleep(10)
        self.check_kill_process(self.environment)
        all_nodes = []
        count = self.robot_count
        if self.method == 'recurrent_connectivity':
            count += 1
        for i in range(count):
            all_nodes += [
                '/robot_{}/GetMap'.format(i), '/robot_{}/Mapper'.format(i),
                '/robot_{}/map_align'.format(i),
                '/robot_{}/navigator'.format(i),
                '/robot_{}/operator'.format(i), '/robot_{}/SetGoal'.format(i)
            ]
            if self.method != "gvgexploration":
                all_nodes += [
                    '/robot_{}/explore_client'.format(i),
                    '/robot_{}/graph'.format(i)
                ]

        all_nodes += ['/rosout', '/RVIZ', '/Stage', '/rostopic*']
        rosnode.kill_nodes(all_nodes)
        rospy.signal_shutdown("Exploration complete! Shutting down")
示例#3
0
 def save_all_data(self, data):
     pu.save_data(
         self.traveled_distance,
         '{}/traveled_distance_{}_{}_{}_{}_{}_{}.pickle'.format(
             self.method, self.environment, self.robot_count, self.run,
             self.termination_metric, self.robot_id,
             self.max_target_info_ratio))
     rospy.signal_shutdown(
         'Robot {}: Received Shutdown Exploration complete!'.format(
             self.robot_id))
示例#4
0
 def save_all_data(self):
     save_data(
         self.exploration_data, '{}/exploration_{}_{}_{}_{}.pickle'.format(
             self.method, self.environment, self.robot_count, self.run,
             self.termination_metric))
     save_data(
         self.shared_data_size,
         '{}/roscbt_data_shared_{}_{}_{}_{}.pickle'.format(
             self.method, self.environment, self.robot_count, self.run,
             self.termination_metric))
示例#5
0
 def save_all_data(self):
     pu.save_data(
         self.traveled_distance,
         '{}/traveled_distance_{}_{}_{}_{}_{}.pickle'.format(
             self.method, self.environment, self.robot_count, self.run,
             self.termination_metric, self.robot_id))
     pu.save_data(
         self.explore_computation,
         '{}/explore_computation_{}_{}_{}_{}_{}.pickle'.format(
             self.method, self.environment, self.robot_count, self.run,
             self.termination_metric, self.robot_id))
示例#6
0
 def save_all_data(self, data):
     save_data(
         self.exploration_data,
         '{}/exploration_{}_{}_{}_{}_{}.pickle'.format(
             self.method, self.environment, self.robot_count, self.run,
             self.termination_metric, self.max_target_info_ratio))
     save_data(
         self.shared_data_size,
         '{}/roscbt_data_shared_{}_{}_{}_{}_{}.pickle'.format(
             self.method, self.environment, self.robot_count, self.run,
             self.termination_metric, self.max_target_info_ratio))
     rospy.signal_shutdown('ROSCBT: Shutdown command received!')
示例#7
0
 def save_all_data(self):
     pu.save_data(
         self.interconnection_data,
         '{}/interconnections_{}_{}_{}_{}_{}.pickle'.format(
             self.method, self.environment, self.robot_count, self.run,
             self.termination_metric, self.robot_id))
     pu.save_data(
         self.frontier_data, '{}/frontiers_{}_{}_{}_{}_{}.pickle'.format(
             self.method, self.environment, self.robot_count, self.run,
             self.termination_metric, self.robot_id))
     msg = String()
     msg.data = '{}'.format(self.robot_id)
     self.is_shutdown_caller = True
 def save_all_data(self, data):
     """ Save data and kill yourself"""
     pu.save_data(
         self.explore_computation,
         '{}/explore_computation_{}_{}_{}_{}_{}_{}.pickle'.format(
             self.method, self.environment, self.robot_count, self.run,
             self.termination_metric, self.robot_id,
             self.max_target_info_ratio))
     pu.save_data(
         self.traveled_distance,
         '{}/traveled_distance_{}_{}_{}_{}_{}_{}.pickle'.format(
             self.method, self.environment, self.robot_count, self.run,
             self.termination_metric, self.robot_id,
             self.max_target_info_ratio))
     rospy.signal_shutdown("Shutting down GVG explore")