def plot_graph(self, axis_size=[-0.5, 3, -0.5, 3]): for obst in self.obstacles: ObstacleMap.plot_polygon(obst) for edge in self.edges: edge.plot() plt.axis('equal') plt.axis(axis_size) plt.show()
def removePointsInObstacle(exploreArray, map, plot=False): newexploreArray = [] for p in exploreArray: if plot: plt.plot(p[0], p[1], 'ro') for obst in map.obstacles: ObstacleMap.plot_polygon(obst) plt.show() isInObstacle = inObstacle(p, map) if not isInObstacle: newexploreArray.append(list(p)) return np.array(newexploreArray)