|
@@ -157,21 +157,25 @@ class Anytime_Dstar(object):
|
|
|
t = 0
|
|
t = 0
|
|
|
self.ComputeorImprovePath()
|
|
self.ComputeorImprovePath()
|
|
|
#TODO publish current epsilon sub-optimal solution
|
|
#TODO publish current epsilon sub-optimal solution
|
|
|
|
|
+ self.done = True
|
|
|
|
|
+ self.ind = 0
|
|
|
self.Path = self.path()
|
|
self.Path = self.path()
|
|
|
|
|
+ visualization(self)
|
|
|
while True:
|
|
while True:
|
|
|
- print(t)
|
|
|
|
|
- print(self.Path)
|
|
|
|
|
- if t == 5:
|
|
|
|
|
|
|
+ visualization(self)
|
|
|
|
|
+ if t == 20:
|
|
|
break
|
|
break
|
|
|
# change environment
|
|
# change environment
|
|
|
- new2,old2 = self.env.move_block(theta = [0,0,0.1*t], mode='rotation')
|
|
|
|
|
|
|
+ # new2,old2 = self.env.move_block(theta = [0,0,0.1*t], mode='rotation')
|
|
|
|
|
+ new2,old2 = self.env.move_block(a = [0,0,-0.2], mode='translation')
|
|
|
ischanged = True
|
|
ischanged = True
|
|
|
# islargelychanged = True
|
|
# islargelychanged = True
|
|
|
self.Path = []
|
|
self.Path = []
|
|
|
|
|
|
|
|
# update cost with changed environment
|
|
# update cost with changed environment
|
|
|
if ischanged:
|
|
if ischanged:
|
|
|
- CHANGED = self.updatecost(True, new2, old2, mode='obb')
|
|
|
|
|
|
|
+ # CHANGED = self.updatecost(True, new2, old2, mode='obb')
|
|
|
|
|
+ CHANGED = self.updatecost(True, new2, old2)
|
|
|
for u in CHANGED:
|
|
for u in CHANGED:
|
|
|
self.UpdateState(u)
|
|
self.UpdateState(u)
|
|
|
self.ComputeorImprovePath()
|
|
self.ComputeorImprovePath()
|