Since getting CARLA set up on my local machine and manually driving vehicles around the city, I’ve taken the next another step in understanding how real self-driving car systems work: sensor simulation and labeled dataset creation.
This week, I built a workflow that simulates a vehicle driving through a city with mounted sensors — and automatically captures:
All of this is saved per frame, which creates the basis of a synthetic dataset. Then I took it one step further: projecting the 3D actor bounding boxes into 2D so they align with the camera image — giving me fully labeled frames just like you’d see in datasets like KITTI or Waymo Open.
🚀 Repo: github.com/CodeJonesW/sensor_simulation_and_data_collection
I created a two-part workflow:
sensor_capture.py
This script:
Output includes:
output/
camera/
bboxes/
camera_transforms/
imu.csv
gps.csv
export_dataset.py
This script:
dataset_index.json
for use in training or visualization toolsFinal output:
output/final_dataset/
images/
000001.png
...
labels/
000001.json
...
dataset_index.json
Each image now has a matching list of 2D bounding boxes — completely automated.
I wanted to understand the pipeline from simulation to training data. That’s what companies like Cruise, Waymo, and Nvidia do every day: simulate scenarios, collect raw data, and label it for model training and evaluation. For example, Waymo’s in-house simulation platform, Simulation City, allows them to test billions of miles virtually — including rare and hazardous driving events — before deploying any updates to their real-world fleet. Every software change they make is first validated in simulation, and the resulting data is used to train and evaluate the machine learning models that power the Waymo Driver. This kind of workflow isn’t just for safety — it’s a cornerstone of how modern autonomous systems are built at scale.
For simulation to be an effective tool, it has to closely represent the environment it's emulating to provide accurate insights into a system’s performance. What happens in simulation must be predictive of what happens in the real world to ensure you are simulating the right things. This requires minimizing the differences between the simulated and real world, from the way your sensors see to the way your agents react to changes in their simulated environments — and are statistically representative of the real world.
Source: Waymo Blog — Simulation City
This project helped me internalize:
It also got me thinking about:
This wraps up my sensor simulation phase. Next, I’ll probably start diving into perception models:
Eventually, I want to move from perception into decision-making and planning — giving my simulated cars brains that respond to sensor input and act accordingly.
If you want to follow the project or clone it to build your own simulated dataset: 🔗 github.com/CodeJonesW/sensor_simulation_and_data_collection
I’d love to hear from anyone experimenting in this space.
Cheers!
Will