HemuManju / carla-data-collector

Scripts to collect data from CARLA and save them as Webdataset
1 stars 1 forks source link
carla-data pytorch webdataset

Carla (0.9.11) dataset collector :car: :floppy_disk:

Script used for collecting data on CARLA version 0.9.11 and save it is as webdataset

Types of data captured include RGB, vehicle data (speed, throttle, etc.) and traffic data. Other types of data (semantic segmentation, lidar, ...) are also implemented. The scripts are modified from carla rllib integration repository (https://github.com/carla-simulator/rllib-integration)

Getting started

Prerequisites

*Until now I've only tested on Ubuntu 20.04. It might work on other OS, but that's not certain.

Installation

  1. Clone this repo
    git clone https://github.com/HemuManju/carla-data-collector
  2. Install dependencies
    pip install -r requirements.txt
  3. Carla installation:

Refer to https://carla.readthedocs.io/en/latest/getting_started/ and https://github.com/carla-simulator/carla/blob/master/Docs/download.md

  1. Change the settings in experiment_config.yaml

  2. Run the collect.py file

    python collect.py
  3. To record different data types (e.g. semantic segmentation, lidar, ...), add the configuration in experiment_config.yaml and change sample function in the data_writer.py file. Currently, the data_writer.py saves only the RGB images and other sensor data.

  4. To create a movie from collected data, run the read.py file after chaning the data read path in the experiment_config.yaml file.

python read.py

The datasets are stored in data directory

TODO:

readme file modified from: https://github.com/AlanNaoto/carla-dataset-runner