optimum_trajectory.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:bolero 作者: rock-learning 项目源码 文件源码
def plot(self, ax):
        """Plot a two-dimensional environment.

        Parameters
        ----------
        ax : Axis
            Matplotlib axis
        """
        if self.n_task_dims != 2:
            raise ValueError("Can only plot 2 dimensional environments")

        ax.scatter(self.x0[0], self.x0[1], c="r", s=100)
        ax.scatter(self.g[0], self.g[1], c="g", s=100)
        if self.obstacles is not None:
            from matplotlib.patches import Circle
            for obstacle in self.obstacles:
                ax.add_patch(Circle(obstacle, self.obstacle_dist, ec="none",
                                    color="r"))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号