Exemplo n.º 1
0
    def loadData (self):
        if (self.orbResultChooser.GetValue()=='' or self.groundTruthChooser.GetValue()==''):
            print ("Select filenames first")
            return None
        print ("Wait...")
        
        # Load ground truth and plot it
        self.ax = self.figure.add_subplot(111)
        self.ax.set_autoscale_on(True)
        self.ax.grid(True)
        self.groundTruth = PoseTable.loadFromBagFile(self.groundTruthChooser.GetValue(), 'world', 'ndt_frame')
        gtTbl = self.groundTruth.toArray()
        self.groundTruthPlot, = self.ax.plot(gtTbl[:,0], gtTbl[:,1])
#        self.groundTruthPlot, = self.ax.plot([0,1,2], [4,5,6])
        
        self.orbResult = PoseTable.loadFromBagFile(self.orbResultChooser.GetValue(), '/ORB_SLAM/World', '/ORB_SLAM/ExtCamera')
        orbTbl = self.orbResult.toArray()
        self.orbResultPlot, = self.ax.plot(orbTbl[:,0], orbTbl[:,1])
        
        self.canvas.draw()
        self.background = self.canvas.copy_from_bbox(self.ax.bbox)
#        self.helpText.Show(True)
        
        self.timeChooser.SetRange(self.orbResult[0].timestamp, self.orbResult.last().timestamp)
        self.currentORBTimestamp = self.orbResult[0].timestamp
        self.redrawPosition()
Exemplo n.º 2
0
    def loadData(self):
        if (self.orbResultChooser.GetValue() == ''
                or self.groundTruthChooser.GetValue() == ''):
            print("Select filenames first")
            return None
        print("Wait...")

        # Load ground truth and plot it
        self.ax = self.figure.add_subplot(111)
        self.ax.set_autoscale_on(True)
        self.ax.grid(True)
        self.groundTruth = PoseTable.loadFromBagFile(
            self.groundTruthChooser.GetValue(), 'world', 'ndt_frame')
        gtTbl = self.groundTruth.toArray()
        self.groundTruthPlot, = self.ax.plot(gtTbl[:, 0], gtTbl[:, 1])
        #        self.groundTruthPlot, = self.ax.plot([0,1,2], [4,5,6])

        self.orbResult = PoseTable.loadFromBagFile(
            self.orbResultChooser.GetValue(), '/ORB_SLAM/World',
            '/ORB_SLAM/ExtCamera')
        orbTbl = self.orbResult.toArray()
        self.orbResultPlot, = self.ax.plot(orbTbl[:, 0], orbTbl[:, 1])

        self.canvas.draw()
        self.background = self.canvas.copy_from_bbox(self.ax.bbox)
        #        self.helpText.Show(True)

        self.timeChooser.SetRange(self.orbResult[0].timestamp,
                                  self.orbResult.last().timestamp)
        self.currentORBTimestamp = self.orbResult[0].timestamp
        self.redrawPosition()
Exemplo n.º 3
0
        self.frame.Show(True)
        self.SetTopWindow(self.frame)
        return True


class tfBagVisualizer (wx.Frame):
    
    def __init__ (self, bag):
        pass
    
    
if __name__ == '__main__':
    
    from sys import argv
    
    groundTruth = PoseTable.loadFromBagFile (argv[1], 'world', 'camera1')
    app = wx.PySimpleApp()
    frame = PlotFigure(groundTruth)
    timer = wx.Timer(frame, TIMER_ID)
    timer.Start(50)
    
    rospy.init_node('ORB_Listener', anonymous=True)
    orbListener = tf.TransformListener()
    
    orbProc1 = TfCollector ('world', 'camera1', orbListener)
    orbProc2 = TfCollector ('world', 'camera2', orbListener)
    
    frame.Show()
    app.MainLoop()
    
    orbProc1.stop = True
        self.frame = AnalyzerWindow()
        self.frame.Show(True)
        self.SetTopWindow(self.frame)
        return True


class tfBagVisualizer(wx.Frame):
    def __init__(self, bag):
        pass


if __name__ == '__main__':

    from sys import argv

    groundTruth = PoseTable.loadFromBagFile(argv[1], 'world', 'camera1')
    app = wx.PySimpleApp()
    frame = PlotFigure(groundTruth)
    timer = wx.Timer(frame, TIMER_ID)
    timer.Start(50)

    rospy.init_node('ORB_Listener', anonymous=True)
    orbListener = tf.TransformListener()

    orbProc1 = TfCollector('world', 'camera1', orbListener)
    orbProc2 = TfCollector('world', 'camera2', orbListener)

    frame.Show()
    app.MainLoop()

    orbProc1.stop = True