def openQualityDialog(self): ''' opens a new dialog that shows the data quality ''' self.bagFiles = self.bagWidget.getBagFiles() if self.bagFiles[0] == "" or self.bagFiles[1] == "": message_module.showMessage( "Bag file missing! Please import bag file in the main interface." ) return qualityDialog = QualityDialog(self.bagFiles, self) qualityDialog.exec_()
def openNewGraphDialog(self): ''' opens new dialog widget to determine the information required for a new plot ''' if self.plotWidget.lineCount >= MAX_LINES: message_module.showMessage( "Maximum number of graphs reached. Delete a graph before adding a new one." ) return self.bagFiles = self.bagWidget.getBagFiles() plotDialog = PlotDialogWidget(self.bagFiles, self) plotDialog.newPlotData.connect(self.plotWidget.plot) plotDialog.exec_()
def btnPressed(self): ''' this slot is called when the button 'Delete' is pressed and emits a signal so that the plot widget deletes the line ''' if self.linesListWidget.count() == 0: # empty list return try: lineNr = self.linesListWidget.currentRow() except: message_module.showMessage("Please select a graph to delete.") # remove the line from the list self.linesListWidget.takeItem(lineNr) # emit the signal self.deletePressed.emit(lineNr)
def valueSelected(self, item): ''' is called when the tree in the value selector widget is clicked the id selector should be disabled if the item "object_count" is clicked ''' if item.text(0) == "object_count": self.idSelector.setEnabled(False) self.thresholdSetter.setEnabled(False) else: self.idSelector.setEnabled(True) self.thresholdSetter.setEnabled(True) # init the idSelector if self.bagFiles[0] == '' or self.bagFiles[1] == '': message_module.showMessage("Bag file missing! Please import bag file in the main interface.") else: try: self.idSelector.refreshList(self.bagFiles[0]) except: message_module.showMessage("Object_IDs could not be parsed. Maybe there is a problem with the selected bag file.")
def calculate(self): if self.bagFiles[0] == "" or self.bagFiles[1] == "": message_module.showMessage( "Bag file missing! Please import bag file in the main interface." ) return threshold = self.spinBox.value() fppi = Rosbag_Analysis.getFPPI(self.bagFiles[0], self.bagFiles[1], threshold) self.fppiLbl.setText("FPPI = " + str(fppi)) mota = Rosbag_Analysis.getMOTA(self.bagFiles[0], self.bagFiles[1], threshold) self.motaLbl.setText("MOTA = " + str(mota)) motp = Rosbag_Analysis.getMOTP(self.bagFiles[0], self.bagFiles[1], threshold) self.motpLbl.setText("MOTP = " + str(motp))
def sourceChanged(self, source): ''' if the source in rawDataSelector is changed this slot is called ''' self.selectedSource = source if source == 0: # ground truth is selected self.idSelector.setTitle("Select GT-ObjectID") try: self.idSelector.refreshList(self.bagFiles[0]) except: message_module.showMessage( "Object_IDs could not be parsed. Maybe there is a problem with the selected bag file." ) elif source == 1: # camera is selected self.idSelector.setTitle("Select Cam-ObjectID") try: self.idSelector.refreshList(self.bagFiles[1]) except: message_module.showMessage( "Object_IDs could not be parsed. Maybe there is a problem with the selected bag file." )