mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
first release grid based_sweep_planner.py
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user