Autopilot in sync mode


I am trying to use the sync mode with the autopilot. Autopilot works fine in async mode, but when I tried to use it in sync mode the vehicle just stands still.
I am using the current version on Windows 10. Did I miss something important??

Here is a piece of code from my code:

client = carla.Client(“localhost”, 2000)
world =client.get_world()
settings = world.get_settings()
settings.synchronous_mode = True # as long as i comment out this line, it works fine
settings.fixed_delta_seconds = 0.5

After that I set up my vehicle, the autopilot etc.

Thanks for any answer :slight_smile:

I got it myself faster than expected.^^

I guess autopilot is set to False each time the server is waiting for a tick, so I just set autopilot to True each time my while loop is starting over again.

while True:

doing some stuff, e.g. data retrieval, processing

1 Like

Do you have a line where you call world.tick()?
In my project, I also had to add a traffic_manager object, but I don’t think it is mandatory.
Also, with a fixed delta time of 0.5, it will take a while before you notice that the cars are moving. Even with a fixed delta time of 0.1, I takes around 20-30 frames to see that car move

Hope it helps