Rodrigo Ferreira Rodrigues commited on
Commit
9fea096
·
1 Parent(s): 74a7ec7

correcting error in algorithm

Browse files
Files changed (1) hide show
  1. path_planning_evaluate.py +1 -1
path_planning_evaluate.py CHANGED
@@ -148,7 +148,7 @@ class Path_Planning_evaluate(evaluate.Metric):
148
  if (x, y) in obst_set:
149
  return metrics #not feasible, correct or optimal
150
 
151
- if i > 0 and (abs(x-gen_path[i][0]) + abs(y-gen_path[i][1]) > 1):
152
  return metrics #not feasible, correct or optimal
153
 
154
  metrics['feasible'] = True
 
148
  if (x, y) in obst_set:
149
  return metrics #not feasible, correct or optimal
150
 
151
+ if i > 0 and (abs(x-gen_path[i-1][0]) + abs(y-gen_path[i-1][1]) > 1):
152
  return metrics #not feasible, correct or optimal
153
 
154
  metrics['feasible'] = True