Skip to content

Commit 8da7450

Browse files
Update scenario_manager.py
1 parent 549f6d4 commit 8da7450

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

srunner/scenariomanager/scenario_manager.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@ def _tick_scenario(self, timestamp):
178178
if self._debug_mode:
179179
print("\n--------- Tick ---------\n")
180180

181-
if self._agent is not None:
182-
self._agent() # pylint: disable=not-callable
181+
183182

184183
_tick_carla_start = time.perf_counter_ns() / 1e6
185184
if self._sync_mode and self._watchdog.get_status():
@@ -188,6 +187,9 @@ def _tick_scenario(self, timestamp):
188187
MetricsCollector.update_key(
189188
"carla_time", (time.perf_counter_ns() / 1e6) - _tick_carla_start
190189
)
190+
191+
if self._agent is not None:
192+
self._agent() # pylint: disable=not-callable
191193

192194
# Update game time and actor information
193195
GameTime.on_carla_tick(timestamp)

0 commit comments

Comments
 (0)