Skip to content

Commit

Permalink
Merge branch 'feature_negative_speed' of github.com:RI-SE/scenario_ru…
Browse files Browse the repository at this point in the history
…nner into feature_negative_speed
  • Loading branch information
eriadam36 committed Jun 28, 2023
2 parents 92b7a86 + 1dc42ca commit 54a5e0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
12 changes: 2 additions & 10 deletions scenario_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def _signal_handler(self, signum, frame):
"""
self._shutdown_requested = True
if self.manager:
self.manager.stop_scenario()
self.manager._running = False

def _get_scenario_class_or_fail(self, scenario):
"""
Expand Down Expand Up @@ -187,14 +187,6 @@ def _cleanup(self):

CarlaDataProvider.cleanup()

for i, _ in enumerate(self.ego_vehicles):
if self.ego_vehicles[i]:
if not self._args.waitForEgo and self.ego_vehicles[i] is not None and self.ego_vehicles[i].is_alive:
print("Destroying ego vehicle {}".format(self.ego_vehicles[i].id))
self.ego_vehicles[i].destroy()
self.ego_vehicles[i] = None
self.ego_vehicles = []

if self.agent_instance:
self.agent_instance.destroy()
self.agent_instance = None
Expand Down Expand Up @@ -415,7 +407,7 @@ def _load_and_run_scenario(self, config):
self._analyze_scenario(config)

# Remove all actors, stop the recorder and save all criterias (if needed)
scenario.remove_all_actors()
# scenario.remove_all_actors()
if self._args.record:
self.client.stop_recorder()
self._record_criteria(self.manager.scenario.get_criteria(), recorder_name)
Expand Down
4 changes: 2 additions & 2 deletions srunner/scenariomanager/scenario_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def _tick_scenario(self, timestamp):
sys.stdout.flush()

if self.scenario_tree.status != py_trees.common.Status.RUNNING:
self._running = False
self._running = True

if self._sync_mode and self._running and self._watchdog.get_status():
CarlaDataProvider.get_world().tick()
Expand All @@ -198,7 +198,7 @@ def stop_scenario(self):
"""
This function is used by the overall signal handler to terminate the scenario execution
"""
self._running = False
pass

def analyze_scenario(self, stdout, filename, junit, json):
"""
Expand Down

0 comments on commit 54a5e0d

Please sign in to comment.