https://github.com/kevinladlee/carla_dataset_tools
Tools for dataset generation based on CARLA simulator. (Data Collector)
https://github.com/kevinladlee/carla_dataset_tools
autonomous-vehicles carla datasets driving-cars simulation
Last synced: 4 months ago
JSON representation
Tools for dataset generation based on CARLA simulator. (Data Collector)
- Host: GitHub
- URL: https://github.com/kevinladlee/carla_dataset_tools
- Owner: KevinLADLee
- License: gpl-3.0
- Created: 2021-11-10T13:51:25.000Z (over 4 years ago)
- Default Branch: dev
- Last Pushed: 2026-01-13T10:23:27.000Z (5 months ago)
- Last Synced: 2026-01-14T17:01:46.351Z (5 months ago)
- Topics: autonomous-vehicles, carla, datasets, driving-cars, simulation
- Language: Python
- Homepage:
- Size: 3.39 MB
- Stars: 135
- Watchers: 4
- Forks: 26
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# đ CARLA Dataset Tools
[](https://www.python.org/)
[](https://carla.org/)
[](LICENSE)
> đŚ A comprehensive data collection and labeling toolkit for CARLA Simulator
Data collection and labeling tools for [CARLA Simulator](https://carla.org/). This toolkit provides an efficient pipeline for generating high-quality autonomous driving datasets with support for multiple sensor types and standard dataset formats.
**â ď¸ Important**: All raw data generated by this tool uses a **right-hand coordinate system**.
đ This work is part of the [**CarlaFLCAV**](https://github.com/SIAT-INVS/CarlaFLCAV) project. Feel free to give us a star!
---
## ⨠Key Features
- â
**Multi-Sensor Support**: RGB Camera, Semantic Segmentation, LiDAR, Semantic LiDAR, Radar, IMU, GNSS
- â
**V2X Communication**: Vehicle-to-Everything (V2X) sensor support for V2V and V2I scenarios
- V2X CAM sensors (ETSI standard) for automatic message generation
- V2X Custom sensors for manual message broadcasting
- Realistic wireless channel modeling with path loss simulation
- â
**Infrastructure Support**: Roadside unit (RSU) simulation for V2X scenarios
- Static infrastructure actors with sensor attachment
- One-way message broadcasting from infrastructure to vehicles
- Support for V2I (Vehicle-to-Infrastructure) communication
- â
**Multiple Dataset Formats**: KITTI Object, YOLOv5, Argoverse
- â
**Flexible Configuration**: YAML-based configuration with validation
- â
**Route Editor**: Interactive tool for creating custom vehicle routes with topology-aware path planning
- â
**BEV Map Capture**: Tool for generating bird's-eye view maps of entire CARLA maps
- â
**Synchronized Recording**: Synchronized multi-vehicle and multi-sensor data collection
- â
**Visualization Tools**: Built-in point cloud and data visualization utilities
- â
**Autopilot Integration**: Automatic vehicle control using CARLA's traffic manager
---
## đ 30-Second Quick Start
```bash
# 1. Clone and install
git clone https://github.com/KevinLADLee/carla_dataset_tools.git
cd carla_dataset_tools
pip3 install -r requirements.txt
# 2. Set environment variable
export CARLA_ROOT=/path/to/your/carla
# 3. Start CARLA
cd $CARLA_ROOT && ./CarlaUE4.sh
# 4. Record data (in a new terminal)
cd carla_dataset_tools
python3 data_recorder.py --profile kitti
# 5. Generate labels
python3 label_tools/kitti_objects_label.py -r record_YYYY_MMDD_HHMM -v vehicle_1st
# 6. Visulize output dataset
python3 tools/viz_lidar.py --type kitti --source dataset/record_YYYY_MMDD_HHMM/vehicle_1st/kitti_object/training/velodyne
```
---
## đ Documentation
### For Users
**[User Guide](docs/USER_GUIDE.md)** - Complete installation and usage guide
- Installation and prerequisites
- Recording data with different profiles
- **Route Editor** - Create custom vehicle routes interactively
- Generating labels (KITTI, YOLOv5, Argoverse)
- Data visualization
- Troubleshooting
**[ä¸ćç¨ćˇćĺ](docs/USER_GUIDE_CN.md)** - ĺŽć´çĺŽčŁ
ĺ使ç¨ćĺ
### For Developers
**[Developer Guide](docs/DEVELOPER.md)** - Technical documentation for developers
- Architecture overview
- Configuration system details (maps, weather, sensors)
- API reference
- Extending the toolkit
- Development workflow
**[ä¸ćĺźĺč
ćĺ](docs/DEVELOPER_CN.md)** - ĺźĺč
ććŻć楣
---
## âď¸ Configuration Profiles
Pre-configured profiles for different dataset styles:
- **`default`** - General purpose with multiple vehicles and sensors
- **`kitti`** - KITTI-style (Velodyne HDL-64E, standard cameras)
- **`argoverse`** - Argoverse-style with ring cameras
- **`simple`** - Minimal configuration for testing
- **`route_example`** - Demonstrates vehicle route following feature
- **`v2x_test`** - V2X communication testing (V2V and V2I scenarios)
- **`bev`** - Bird's-eye view camera configuration for map capture
```bash
# List available profiles
python3 tools/config_list.py
# Use a profile
python3 data_recorder.py --profile kitti
# Create custom vehicle routes
python3 tools/editor_route.py --map Town02 --name my_route
# Capture BEV map of entire CARLA map
python3 tools/capture_map_bev.py --map Town02 --output ./bev_output
# Validate a configuration
python3 tools/config_validate.py --profile kitti
```
See [Developer Guide](docs/DEVELOPER.md) for complete configuration reference.
---
## đ Supported Dataset Formats
- **KITTI Object Detection** - 3D bounding boxes with calibration
- **YOLOv5** - 2D bounding box annotations
- **Argoverse** - Ring camera setup (experimental)
---
## đ§ Prerequisites
- **CARLA Simulator** >= 0.9.16
- **Python** >= 3.8
- **Operating System**: Linux (recommended) / Windows
> Download CARLA: [https://github.com/carla-simulator/carla/releases](https://github.com/carla-simulator/carla/releases)
---
## đ Project Structure
```
carla_dataset_tools/
âââ config/ # Configuration management
â âââ config_manager.py # YAML config loader and validator
â âââ profiles/ # Pre-configured profiles (default, kitti, argoverse, simple, route_example)
âââ docs/ # Documentation
â âââ USER_GUIDE.md # User guide (English)
â âââ USER_GUIDE_CN.md # User guide (Chinese)
â âââ DEVELOPER.md # Developer guide (English)
â âââ DEVELOPER_CN.md # Developer guide (Chinese)
âââ label_tools/ # Labeling scripts (KITTI, YOLO, Argoverse)
âââ recorder/ # Core recording modules
âââ routes/ # Vehicle route definitions (YAML + PKL)
âââ core/ # Core shared modules (geometry, transform, logger)
âââ tools/ # CLI utility scripts
â âââ editor_route.py # Route editor
â âââ capture_map_bev.py # BEV map capture tool
â âââ viz_lidar.py # LiDAR visualization
â âââ ... # Other utilities
âââ data_recorder.py # Main recording script
```
---
## đ¤ Contributing
Contributions are welcome! Areas for contribution:
- Additional dataset format support (nuScenes, Waymo, etc.)
- Enhanced documentation and examples
- Bug fixes and performance improvements
- New sensor types or features
Please submit pull requests to the main repository.
---
## đ Citation
If you use this tool in your research, please cite:
```bibtex
@article{wang2022federated,
title={Federated deep learning meets autonomous vehicle perception: Design and verification},
author={Wang, Shuai and Li, Chengyang and Ng, Derrick Wing Kwan and Eldar, Yonina C and Poor, H Vincent and Hao, Qi and Xu, Chengzhong},
journal={IEEE network},
volume={37},
number={3},
pages={16--25},
year={2022},
publisher={IEEE}
}
```
---
## đ Acknowledgements
This project builds upon:
- [**CARLA Simulator**](https://carla.org/) - Open-source autonomous driving simulator
- [**CARLA ROS Bridge**](https://github.com/carla-simulator/ros-bridge) - ROS integration for CARLA
- [**CARLA_INVS**](https://github.com/zijianzhang/CARLA_INVS) - Infrastructure and vehicle simulation
---
## đ License
This project is licensed under the GNU General Public License v3.0 - see the [LICENSE](LICENSE) file for details.
---
## đŽ Contact & Support
- **Issues**: [GitHub Issues](https://github.com/KevinLADLee/carla_dataset_tools/issues)
- **Project**: [CarlaFLCAV](https://github.com/SIAT-INVS/CarlaFLCAV)
- **Documentation**: [User Guide](docs/USER_GUIDE.md) | [Developer Guide](docs/DEVELOPER.md)
---
**â If this project helps your research, please give us a star! â**
[đ Home](https://github.com/KevinLADLee/carla_dataset_tools) ⢠[đ User Guide](docs/USER_GUIDE.md) ⢠[đ§ Developer Guide](docs/DEVELOPER.md) ⢠[đ Report Bug](https://github.com/KevinLADLee/carla_dataset_tools/issues)