diff --git a/examples/logdemoplt.py b/examples/logdemoplt.py index d3d8d8e..31dd9a1 100755 --- a/examples/logdemoplt.py +++ b/examples/logdemoplt.py @@ -110,8 +110,8 @@ def main(): # Create a byte array to receive the computed maps mapbytes = bytearray(MAP_SIZE_PIXELS * MAP_SIZE_PIXELS) - # Set up a SLAM display - display = SlamShow(MAP_SIZE_PIXELS, MAP_SIZE_METERS*1000/MAP_SIZE_PIXELS, 'SLAM') + # Set up a SLAM display, named by dataset + display = SlamShow(MAP_SIZE_PIXELS, MAP_SIZE_METERS*1000/MAP_SIZE_PIXELS, dataset) # Pose will be modified in our threaded code pose = [0,0,0] diff --git a/examples/pltslamshow.py b/examples/pltslamshow.py index ae75e2c..eba5463 100644 --- a/examples/pltslamshow.py +++ b/examples/pltslamshow.py @@ -53,12 +53,11 @@ import numpy as np 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 self.map_size_pixels = map_size_pixels 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 self.bgrbytes = bytearray(map_size_pixels * map_size_pixels * 3) @@ -70,6 +69,7 @@ class SlamShow(object): self.figid = id(fig) fig.canvas.set_window_title('SLAM') + plt.title(title) self.ax = fig.gca() self.ax.set_aspect("auto")