def updateMap(self, robotRel, destination, mapMatrix):
    # send maps to image object
    self.myImg.set_data(mapMatrix) # 20ms

    # finishing touches
    removeMarkers(self.markers) # delete old robot position from map
    marker = drawMarker(self.ax, robotRel, destination) # add new robot position to map # 0.2ms
    self.markers.append(marker) # marker is a list of matplotlib.line.Line2D objects

    # refresh the figure
    self.canvas.draw() # 200ms
  def updateMap(self, robotRel, destination, insetMatrix):
    # send maps to image object
    self.myImg.set_data(insetMatrix) # 0.4ms

    # finishing touches
    removeMarkers(self.markers) # delete old robot position from map
    marker = drawMarker(self.ax, (0,0,0), destination) # draw permanent robot at center of inset map
    self.markers.append(marker) # marker is a list of matplotlib.line.Line2D objects
    self.ax.set_xlabel('X = {0:6.1f}; Y = {1:6.1f};\nHeading = {2:6.1f}'.format(*robotRel))

    # refresh the figure
    self.canvas.draw() # 200ms
Example #3
0
    def updateMap(self, robotRel, destination, mapMatrix):
        # send maps to image object
        self.myImg.set_data(mapMatrix)  # 20ms

        # finishing touches
        removeMarkers(self.markers)  # delete old robot position from map
        marker = drawMarker(
            self.ax, robotRel,
            destination)  # add new robot position to map # 0.2ms
        self.markers.append(
            marker)  # marker is a list of matplotlib.line.Line2D objects

        # refresh the figure
        self.canvas.draw()  # 200ms
Example #4
0
    def updateMap(self, robotRel, destination, insetMatrix):
        # send maps to image object
        self.myImg.set_data(insetMatrix)  # 0.4ms

        # finishing touches
        removeMarkers(self.markers)  # delete old robot position from map
        marker = drawMarker(
            self.ax, (0, 0, 0),
            destination)  # draw permanent robot at center of inset map
        self.markers.append(
            marker)  # marker is a list of matplotlib.line.Line2D objects
        self.ax.set_xlabel(
            'X = {0:6.1f}; Y = {1:6.1f};\nHeading = {2:6.1f}'.format(
                *robotRel))

        # refresh the figure
        self.canvas.draw()  # 200ms