first release grid based_sweep_planner.py

This commit is contained in:
Atsushi Sakai
2019-06-30 12:37:09 +09:00
parent 6314c40c7d
commit 474ffef84b
3 changed files with 278 additions and 3 deletions

View File

@@ -185,13 +185,14 @@ class GridMap:
return inside
def plot_grid_map(self):
def plot_grid_map(self, ax=None):
grid_data = np.reshape(np.array(self.data), (self.height, self.width))
fig, ax = plt.subplots()
if not ax:
fig, ax = plt.subplots()
heat_map = ax.pcolor(grid_data, cmap="Blues", vmin=0.0, vmax=1.0)
plt.axis("equal")
plt.show()
# plt.show()
return heat_map