This commit is contained in:
zhm-real
2020-07-28 00:48:51 -07:00
parent 36249933db
commit ffa911e80c
21 changed files with 417 additions and 72 deletions
+2 -2
View File
@@ -66,9 +66,9 @@ class rrtstar():
Xnear = near(self,xnew)
self.V.append(xnew) # add point
# visualization(self)
# minimal path and minimal cost
# minimal path and minimal Cost
xmin, cmin = xnearest, cost(self, xnearest) + getDist(xnearest, xnew)
# connecting along minimal cost path
# connecting along minimal Cost path
for xnear in Xnear:
xnear = tuple(xnear)
c1 = cost(self, xnear) + getDist(xnew, xnear)
+1 -1
View File
@@ -199,7 +199,7 @@ def steer(initparams, x, y):
return xnew
def cost(initparams, x):
'''here use the additive recursive cost function'''
'''here use the additive recursive Cost function'''
if x == initparams.x0:
return 0
return cost(initparams, initparams.Parent[x]) + getDist(x, initparams.Parent[x])