dstar.py 文件源码

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

项目:Learning-to-navigate-without-a-map 作者: ToniRV 项目源码 文件源码
def __process_path__(self, path, next_move_only=True):
        if len(path) != 0:
            path = path[:-1]
            print("[INFO] Received path: %s" % (path))
            path_list = []
            for a in path.split('.'):
                path_list.append(int(a))
            path_list = np.unravel_index(path_list, self.imsize)
            solution_list = []
            for i in xrange(path_list[0].shape[0]):
                solution_list.append((path_list[0][i],
                                      path_list[1][i]))
            if next_move_only:
                return False, solution_list[1]
            else:
                return False, solution_list
        else:
            print("[ERROR] Errors found while running dstar algorithm.")
            return True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号