carla-simulator / carla

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

How to save multiple sensor's data to disk simultaneously? (I need to save Raw, depth and semantic segmentation images of every frame in autopilot mode, to disk) #7223

Closed bsandy1978 closed 4 months ago

bsandy1978 commented 6 months ago

CARLA version: 0.9.15 Platform/OS: Windows

I need to save Raw, depth and semantic segmentation images of every frame, in autopilot mode, to disk. I need a python script that does the same. I can save Raw RGB images to disk, but I need the images of other sensors too, to save simultaneously in separate folders.

PatrickPromitzer commented 5 months ago

For your case, reading the examples would help. https://github.com/carla-simulator/carla/blob/master/PythonAPI/examples/sensor_synchronization.py

This example is using

blueprint_library = world.get_blueprint_library()
cam_bp = blueprint_library.find('sensor.camera.rgb')
lidar_bp = blueprint_library.find('sensor.lidar.ray_cast')
radar_bp = blueprint_library.find('sensor.other.radar')

How you want to save your sensor data after you get them, is your choice.

JoseM98 commented 4 months ago

Hi @bsandy1978, have you been able to solve your problem with what PatrickPromitzer has commented?

JoseM98 commented 4 months ago

As there has been no response I close the issue. Feel free to reopen it.