Skip to content

Commit 321f05e

Browse files
refactored driving score to not be zero on terminal condition
1 parent b7264fd commit 321f05e

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

aw_scenario_runner.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,9 @@
4040
"CollisionTest": 1.0,
4141
"RunningRedLightTest": 0.4,
4242
"RunningStopTest": 0.25,
43+
"AgentBlockedTest": 0.4,
4344
}
4445

45-
terminations_dict = {"AgentBlockedTest": 0.0}
46-
4746
metrics_collected = {
4847
"timestamp": 0.0, # when tick started
4948
"total_tick": 0.0,
@@ -397,11 +396,6 @@ def _output_criteria(
397396
def _calculate_driving_score(self, criteria: dict) -> float:
398397
driving_score = 0.0
399398

400-
for key in terminations_dict.keys():
401-
if not criteria[key]["success_value"] == criteria[key]["actual_value"]:
402-
logger.info(f"Found terminal condition {key}.")
403-
return 0.0 # hit a termination condition, driving score of 0.0
404-
405399
completed_route = float(criteria["RouteCompletionTest"]["actual_value"]) / 100
406400
logger.info(f"Agent route completion: {completed_route * 100}%")
407401

0 commit comments

Comments
 (0)