movement_planning #2

Merged
s473585 merged 13 commits from movement_planning into master 2023-05-24 14:28:17 +02:00
Showing only changes of commit fcc46fcaf5 - Show all commits

View File

@ -17,9 +17,9 @@ def astar(istate, goalx, goaly, passedFields):
return steps return steps
element = successors(state, passedFields, goalx, goaly) element = successors(state, passedFields, goalx, goaly)
explored.add((state.xpos, state.ypos, state.orientation, state.priority)) explored.add((state.xpos, state.ypos, state.orientation))
for value in element: for value in element:
val = (value.xpos, value.ypos, value.orientation, value.priority) val = (value.xpos, value.ypos, value.orientation)
if val in explored: if val in explored:
continue continue
cost = state.priority + value.priority cost = state.priority + value.priority