Added brief pause before map display to support refresh on slower machines

This commit is contained in:
simondlevy
2018-07-16 22:38:58 -07:00
parent 657e8d79f9
commit aef9554128

View File

@@ -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)