carla-simulator / carla

Open-source simulator for autonomous driving research.
http://carla.org
MIT License
11.45k stars 3.71k forks source link

Editor in Carla UE5 freezes after ending python script in sync mode #8409

Closed PabloVD closed 19 hours ago

PabloVD commented 19 hours ago

In Carla UE5, ue5-dev branch, start server in editor and then run a a python script in synchronous mode. After the script finishes, the editor freezes.

Minimal code to reproduce the issue:

import carla

client = carla.Client()
world = client.get_world()

settings = world.get_settings()
settings.synchronous_mode = True
settings.fixed_delta_seconds = 0.05
world.apply_settings(settings)

try:
    while True:
        world.tick()

finally:
    print("Done!")
PabloVD commented 19 hours ago

Adding a settings.synchronous_mode = False and world.apply_settings(settings) inside the finally fixes the poblem. However, without it, is should freeze only the simulation, not the entire engine.