Ejemplo n.º 1
0
 def plot_start_goal_arrow(self):
     """
         PLOT_START_GOAL_ARROW is a helper function used in DRAW_GRAPH function
     """
     dubins_path_planning.plot_arrow(self.start.x, self.start.y,
                                     self.start.yaw)
     dubins_path_planning.plot_arrow(self.goal.x, self.goal.y,
                                     self.goal.yaw)
Ejemplo n.º 2
0
    def DrawGraph(self, rnd=None):
        plt.clf()
        if rnd is not None:
            plt.plot(rnd[0], rnd[1], "^k")
        for node in self.nodeList:
            if node.parent is not None:
                plt.plot(node.path_x, node.path_y, "-g")

        for (ox, oy, size) in self.obstacleList:
            plt.plot(ox, oy, "ok", ms=30 * size)

        dubins_path_planning.plot_arrow(self.start.x, self.start.y,
                                        self.start.yaw)
        dubins_path_planning.plot_arrow(self.end.x, self.end.y, self.end.yaw)

        plt.axis([-2, 15, -2, 15])
        plt.grid(True)
        plt.pause(0.01)
Ejemplo n.º 3
0
    def DrawGraph(self, rnd=None):  # pragma: no cover
        plt.clf()
        if rnd is not None:
            plt.plot(rnd[0], rnd[1], "^k")
        for node in self.nodeList:
            if node.parent is not None:
                plt.plot(node.path_x, node.path_y, "-g")

        for (ox, oy, size) in self.obstacleList:
            plt.plot(ox, oy, "ok", ms=30 * size)

        dubins_path_planning.plot_arrow(
            self.start.x, self.start.y, self.start.yaw)
        dubins_path_planning.plot_arrow(
            self.end.x, self.end.y, self.end.yaw)

        plt.axis([-2, 15, -2, 15])
        plt.grid(True)
        plt.pause(0.01)
Ejemplo n.º 4
0
    def DrawGraph(self, rnd=None):
        u"""
        Draw Graph
        """
        import matplotlib.pyplot as plt
        plt.clf()
        if rnd is not None:
            plt.plot(rnd[0], rnd[1], "^k")
        for node in self.nodeList:
            if node.parent is not None:
                plt.plot(node.path_x, node.path_y, "-g")

        for (ox, oy, size) in obstacleList:
            plt.plot(ox, oy, "ok", ms=30 * size)

        dubins_path_planning.plot_arrow(self.start.x, self.start.y,
                                        self.start.yaw)
        dubins_path_planning.plot_arrow(self.end.x, self.end.y, self.end.yaw)

        plt.axis([-2, 15, -2, 15])
        plt.grid(True)
        plt.pause(0.01)
        matplotrecorder.save_frame()  # save each frame
Ejemplo n.º 5
0
    def DrawGraph(self, rnd=None):
        u"""
        Draw Graph
        """
        plt.clf()
        if rnd is not None:
            plt.plot(rnd.x, rnd.y, "^k")
        for node in self.nodeList:
            if node.parent is not None:
                plt.plot(node.path_x, node.path_y, "-g")
                #  plt.plot([node.x, self.nodeList[node.parent].x], [
                #  node.y, self.nodeList[node.parent].y], "-g")

        for (ox, oy, size) in self.obstacleList:
            plt.plot(ox, oy, "ok", ms=30 * size)

        dubins_path_planning.plot_arrow(
            self.start.x, self.start.y, self.start.yaw)
        dubins_path_planning.plot_arrow(
            self.end.x, self.end.y, self.end.yaw)

        plt.axis([-2, 15, -2, 15])
        plt.grid(True)
        plt.pause(0.01)
Ejemplo n.º 6
0
 def plot_start_goal_arrow(self):  # pragma: no cover
     dubins_path_planning.plot_arrow(self.start.x, self.start.y,
                                     self.start.yaw)
     dubins_path_planning.plot_arrow(self.end.x, self.end.y, self.end.yaw)
Ejemplo n.º 7
0
 def plot_start_goal_arrow(self):
     dubins_path_planning.plot_arrow(self.start.x, self.start.y,
                                     self.start.yaw)
     dubins_path_planning.plot_arrow(self.end.x, self.end.y, self.end.yaw)