Use experiment name as figure title
This commit is contained in:
@@ -110,8 +110,8 @@ def main():
|
|||||||
# Create a byte array to receive the computed maps
|
# Create a byte array to receive the computed maps
|
||||||
mapbytes = bytearray(MAP_SIZE_PIXELS * MAP_SIZE_PIXELS)
|
mapbytes = bytearray(MAP_SIZE_PIXELS * MAP_SIZE_PIXELS)
|
||||||
|
|
||||||
# Set up a SLAM display
|
# Set up a SLAM display, named by dataset
|
||||||
display = SlamShow(MAP_SIZE_PIXELS, MAP_SIZE_METERS*1000/MAP_SIZE_PIXELS, 'SLAM')
|
display = SlamShow(MAP_SIZE_PIXELS, MAP_SIZE_METERS*1000/MAP_SIZE_PIXELS, dataset)
|
||||||
|
|
||||||
# Pose will be modified in our threaded code
|
# Pose will be modified in our threaded code
|
||||||
pose = [0,0,0]
|
pose = [0,0,0]
|
||||||
|
|||||||
@@ -53,12 +53,11 @@ import numpy as np
|
|||||||
|
|
||||||
class SlamShow(object):
|
class SlamShow(object):
|
||||||
|
|
||||||
def __init__(self, map_size_pixels, map_scale_mm_per_pixel, window_name):
|
def __init__(self, map_size_pixels, map_scale_mm_per_pixel, title):
|
||||||
|
|
||||||
# Store constants for update
|
# Store constants for update
|
||||||
self.map_size_pixels = map_size_pixels
|
self.map_size_pixels = map_size_pixels
|
||||||
self.map_scale_mm_per_pixel = map_scale_mm_per_pixel
|
self.map_scale_mm_per_pixel = map_scale_mm_per_pixel
|
||||||
self.window_name = window_name
|
|
||||||
|
|
||||||
# Create a byte array to display the map with a color overlay
|
# Create a byte array to display the map with a color overlay
|
||||||
self.bgrbytes = bytearray(map_size_pixels * map_size_pixels * 3)
|
self.bgrbytes = bytearray(map_size_pixels * map_size_pixels * 3)
|
||||||
@@ -70,6 +69,7 @@ class SlamShow(object):
|
|||||||
self.figid = id(fig)
|
self.figid = id(fig)
|
||||||
|
|
||||||
fig.canvas.set_window_title('SLAM')
|
fig.canvas.set_window_title('SLAM')
|
||||||
|
plt.title(title)
|
||||||
|
|
||||||
self.ax = fig.gca()
|
self.ax = fig.gca()
|
||||||
self.ax.set_aspect("auto")
|
self.ax.set_aspect("auto")
|
||||||
|
|||||||
Reference in New Issue
Block a user