diff --git a/examples/pltslamshow.py b/examples/pltslamshow.py index d85c1ff..47eacdc 100644 --- a/examples/pltslamshow.py +++ b/examples/pltslamshow.py @@ -25,6 +25,7 @@ import matplotlib.pyplot as plt import matplotlib.cm as colormap from math import sin, cos, radians import numpy as np +from time import sleep class SlamShow(object): @@ -78,6 +79,9 @@ class SlamShow(object): mapimg = np.reshape(np.frombuffer(mapbytes, dtype=np.uint8), (self.map_size_pixels, self.map_size_pixels)) + # Pause to allow display to refresh + sleep(.001) + if self.img_artist is None: self.img_artist = self.ax.imshow(mapimg, cmap=colormap.gray)