def initUI(self): global count self.setWindowTitle(self.title) self.setGeometry(self.left, self.top, self.width, self.height) buttonReply = QMessageBox.information( self, 'Object Detection', "%s Detection \n do you want to record continue?" % catch, QMessageBox.Yes | QMessageBox.Save | QMessageBox.Cancel | QMessageBox.Reset | QMessageBox.No, QMessageBox.No) if buttonReply == QMessageBox.Yes: print('Yes clicked.') elif buttonReply == QMessageBox.Save: print('Save clicked.') elif buttonReply == QMessageBox.Cancel: print('Cancel clicked.') elif buttonReply == QMessageBox.Close: print('Close clicked.') elif buttonReply == QMessageBox.Reset: print('Reply clicked.') else: os.system("rosnode list | grep record* | xargs rosnode kill") print('No clicked.') count = 0 print(count)
def mergeTracks(self, unused=None): (track1Id, ok) = QInputDialog.getInteger(self.widget, "Merge two tracks", "Please enter the ID of the 1st person track you want to merge.") if not ok: return (track2Id, ok) = QInputDialog.getInteger(self.widget, "Merge two tracks", "Please enter the ID of the 2nd person track you want to merge.") if not ok: return if track1Id == track2Id: QMessageBox.critical(self.widget, "Merge two tracks", "Track IDs cannot be identical!") return if self.verifyTrackExists(track1Id) and self.verifyTrackExists(track2Id): self.editor.mergeTracks(track1Id, track2Id) self.updateTrackCount() QMessageBox.information(self.widget, "Merge two tracks", "Person tracks %d and %d have been merged!" % (track1Id, track2Id))
def initUI(self): global count global search_flag global tic_flag global robot2_waynum global robot3_waynum global stat2 global stat3 global total_list1 global total_list2 search_flag = False global patrol_targetFind_flag global total_flag global stat2 patrol_targetFind_flag = False count = 0 self.setWindowTitle(self.title) self.setGeometry(self.left, self.top, self.width, self.height) buttonReply = QMessageBox.information( self, 'Object Detection', "person Detection \n do you want to record continue?", QMessageBox.Yes | QMessageBox.Save | QMessageBox.Cancel | QMessageBox.Reset | QMessageBox.No, QMessageBox.No) print("@@@@@@@@@@@@@@@@") cctv = [7, 8, 10] if buttonReply == QMessageBox.Yes: # no action testmessage() print('Yes clicked.') elif buttonReply == QMessageBox.Save: # print('Save clicked.') elif buttonReply == QMessageBox.Cancel: # print('Cancel clicked.') elif buttonReply == QMessageBox.Close: # print('Close clicked.') elif buttonReply == QMessageBox.Reset: # patrol start tic_flag = True print("start patrol") #search_flag = True robot_first_nav() print("start patrol1") start = search_start_position(cctv) print("start patrol2") go_list = search(start, cctv) backup_list = copy.deepcopy(go_list) backup_list.reverse() print(backup_list) print("start patrol3") search_nearest_position(go_list) if patrol_targetFind_flag == False: print(patrol_targetFind_flag) print(backup_list) search_nearest_position(backup_list) if patrol_targetFind_flag == False: total_flag = 1 stat2 = 3 stat3 = 3 # search_nearest_position(total_list) # print("total patrol") print("start patrol4") #search_flag = False patrol_targetFind_flag = False else: os.system("rosnode list | grep record* | xargs rosnode kill") print('No clicked.') count = 0 print(count)