Autopilot in sync mode

Hi,

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 0.9.10.1 on Windows 10. Did I miss something important??

Here is a piece of code from my code:

client = carla.Client(“localhost”, 2000)
client.set_timeout(5.0)
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
world.apply_settings(settings)

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:
self.my_vehicle.set_autopilot(True)

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

1 Like