Remove PathLen in informed RRT* and instead with cBest

This commit is contained in:
Mengge Jin
2019-10-27 16:08:28 +08:00
committed by GitHub
parent 66fe2f5ef6
commit 69772b4ad6

View File

@@ -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