From a6916c4bcfd908e002d0ed1dd75f480abff6c543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Martyniak?= Date: Thu, 23 Jul 2020 16:31:07 +0200 Subject: [PATCH] Remove evaluation seed from ngsim, apply globally instead --- carla_real_traffic_scenarios/ngsim/scenario.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/carla_real_traffic_scenarios/ngsim/scenario.py b/carla_real_traffic_scenarios/ngsim/scenario.py index c0dab6e..c5c784e 100644 --- a/carla_real_traffic_scenarios/ngsim/scenario.py +++ b/carla_real_traffic_scenarios/ngsim/scenario.py @@ -44,7 +44,6 @@ def __init__( data_dir, reward_type: RewardType, client: carla.Client, - evaluation_scenario_seed: Optional[int] = None ): super().__init__(client) setup_carla_settings(client, synchronous=True, time_delta_s=DT) @@ -91,8 +90,6 @@ def reset(self, vehicle: carla.Vehicle): self._early_stop_monitor = EarlyStopMonitor(vehicle, timeout_s=timeout_s) while True: - if self._evaluation_scenario_seed is not None: - random.seed(self._evaluation_scenario_seed) self._lane_change: LaneChangeInstant = random.choice(self._lane_change_instants) frame_manuveur_start = max(self._lane_change.frame_start - FRAMES_BEFORE_MANUVEUR, 0) self._ngsim_recording.reset(timeslot=self._lane_change.timeslot, frame=frame_manuveur_start - 1)