From 69772b4ad66cc27f7195659fff14e6c8006203b4 Mon Sep 17 00:00:00 2001 From: Mengge Jin Date: Sun, 27 Oct 2019 16:08:28 +0800 Subject: [PATCH] Remove PathLen in informed RRT* and instead with cBest --- PathPlanning/InformedRRTStar/informed_rrt_star.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PathPlanning/InformedRRTStar/informed_rrt_star.py b/PathPlanning/InformedRRTStar/informed_rrt_star.py index 4a32801d..6047660f 100644 --- a/PathPlanning/InformedRRTStar/informed_rrt_star.py +++ b/PathPlanning/InformedRRTStar/informed_rrt_star.py @@ -40,7 +40,6 @@ class InformedRRTStar: self.node_list = [self.start] # max length we expect to find in our 'informed' sample space, starts as infinite cBest = float('inf') - pathLen = float('inf') solutionSet = set() path = None @@ -89,7 +88,7 @@ class InformedRRTStar: lastIndex = len(self.node_list) - 1 tempPath = self.get_final_course(lastIndex) tempPathLen = self.get_path_len(tempPath) - if tempPathLen < pathLen: + if tempPathLen < cBest: path = tempPath cBest = tempPathLen