leaderboard/leaderboard/scenarios/scenario_manager.py
def _tick_scenario(self, timestamp):
        """
        Run next tick of scenario and the agent and tick the world.
        """

        if self._timestamp_last_run < timestamp.elapsed_seconds and self._running:
            self._timestamp_last_run = timestamp.elapsed_seconds

            self._watchdog.update()
            # Update game time and actor information
            GameTime.on_carla_tick(timestamp)
            CarlaDataProvider.on_carla_tick()

            try:
                ego_action = self._agent()

            # Special exception inside the agent that isn't caused by the agent
            except SensorReceivedNoData as e:
                raise RuntimeError(e)

            except Exception as e:
                raise AgentError(e)

            self.ego_vehicles[0].apply_control(ego_action)

            # Tick scenario
            self.scenario_tree.tick_once()

            if self._debug_mode:
                print("\n")
                py_trees.display.print_ascii_tree(
                    self.scenario_tree, show_status=True)
                sys.stdout.flush()

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

            spectator = CarlaDataProvider.get_world().get_spectator()
            ego_trans = self.ego_vehicles[0].get_transform()
            spectator.set_transform(carla.Transform(ego_trans.location + carla.Location(z=50),
                                                        carla.Rotation(pitch=-90)))

        if self._running and self.get_running_status():
            CarlaDataProvider.get_world().tick(self._timeout)

        Run next tick of scenario and the agent and tick the world.
        
Run next tick of scenario and the agent and tick the world.
Run next tick of scenario and the agent and tick the world .
def _tick_scenario(self, timestamp):
        if self._timestamp_last_run < timestamp.elapsed_seconds and self._running:
            self._timestamp_last_run = timestamp.elapsed_seconds
            self._watchdog.update()
            GameTime.on_carla_tick(timestamp)
            CarlaDataProvider.on_carla_tick()
            try:
                ego_action = self._agent()
            except SensorReceivedNoData as e:
                raise RuntimeError(e)
            except Exception as e:
                raise AgentError(e)
            self.ego_vehicles[0].apply_control(ego_action)
            self.scenario_tree.tick_once()
            if self._debug_mode:
                print("\n")
                py_trees.display.print_ascii_tree(
                    self.scenario_tree, show_status=True)
                sys.stdout.flush()
            if self.scenario_tree.status != py_trees.common.Status.RUNNING:
                self._running = False
            spectator = CarlaDataProvider.get_world().get_spectator()
            ego_trans = self.ego_vehicles[0].get_transform()
            spectator.set_transform(carla.Transform(ego_trans.location + carla.Location(z=50),
                                                        carla.Rotation(pitch=-90)))
        if self._running and self.get_running_status():
            CarlaDataProvider.get_world().tick(self._timeout)
def _tick_scenario ( self , timestamp ) : if self . _timestamp_last_run < timestamp . elapsed_seconds and self . _running : self . _timestamp_last_run = timestamp . elapsed_seconds self . _watchdog . update ( ) GameTime . on_carla_tick ( timestamp ) CarlaDataProvider . on_carla_tick ( ) try : ego_action = self . _agent ( ) except SensorReceivedNoData as e : raise RuntimeError ( e ) except Exception as e : raise AgentError ( e ) self . ego_vehicles [ 0 ] . apply_control ( ego_action ) self . scenario_tree . tick_once ( ) if self . _debug_mode : print ( "\n" ) py_trees . display . print_ascii_tree ( self . scenario_tree , show_status = True ) sys . stdout . flush ( ) if self . scenario_tree . status != py_trees . common . Status . RUNNING : self . _running = False spectator = CarlaDataProvider . get_world ( ) . get_spectator ( ) ego_trans = self . ego_vehicles [ 0 ] . get_transform ( ) spectator . set_transform ( carla . Transform ( ego_trans . location + carla . Location ( z = 50 ) , carla . Rotation ( pitch = - 90 ) ) ) if self . _running and self . get_running_status ( ) : CarlaDataProvider . get_world ( ) . tick ( self . _timeout )
Run next tick of scenario and the agent and tick the world.
Run next tick of scenario and the agent and tick the world .
"""
        Run next tick of scenario and the agent and tick the world.
        """ # Update game time and actor information # Special exception inside the agent that isn't caused by the agent # Tick scenario
self
timestamp