carla-simulator / carla

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

Manual camera timing #7909

Open LeonardMendicantBias opened 4 days ago

LeonardMendicantBias commented 4 days ago

Dear Carla developers, contributors, and users.

I would like to set up a scenario in Carla where multiple RGB cameras capture images at different times. I have noticed that the images captured by the cameras have different times according to image.frame. However, is there a way that I can set the camera to start capturing images at an exact time?

PatrickPromitzer commented 3 days ago

You can use "synchronous-mode" https://carla.readthedocs.io/en/latest/adv_traffic_manager/#synchronous-mode

With the "synchronous-mode" Carla waits until you tell Carla to continue.

If you want the frames 10-20 for the first camera, you can ignore the sensor data before frame 10, or add the listener at frame 9.

Example Script https://github.com/carla-simulator/carla/blob/dev/PythonAPI/examples/sensor_synchronization.py