Skip to content

Commit

Permalink
Hot fix metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiopaniego committed Oct 15, 2021
1 parent 49ea3b5 commit 6d0fae0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions behavior_metrics/utils/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ def read_perfect_lap_rosbag(ground_truth_lap_file):
perfect_lap_checkpoints.append(row)

start_point = perfect_lap_checkpoints[0]
for x, point in enumerate(perfect_lap_checkpoints):
if x > 100 and is_finish_line(point, start_point):
lap_point = point
break
lap_point = 0
for ckp_iter, point in enumerate(perfect_lap_checkpoints):
if ckp_iter > 100 and is_finish_line(point, start_point):
if type(lap_point) == int:
lap_point = point
break

circuit_diameter = circuit_distance_completed(perfect_lap_checkpoints, lap_point)
shutil.rmtree(ground_truth_lap_file.split('.bag')[0])
Expand Down

0 comments on commit 6d0fae0

Please sign in to comment.