CARLA Observability Toolkit captures CARLA simulation telemetry as run-scoped datasets and provides a React dashboard for exploration and comparison. Each run is persisted as structured artifacts so results can be validated, analyzed, and reviewed consistently.
- Run-centric observability pipeline for CARLA simulation sessions
- Structured artifacts per run (
metadata.json,metrics.csv,events.json) - Flask API for run listing and run-detail loading
- React dashboard UI for exploration and comparison
frontend/- React + Vite dashboard sourcebackend/- Flask API + React production host (backend/app.py)src/cot/- observability/runtime pipelinescripts/- validation and report utilitiesruns/- generated run artifacts
Most common end-to-end demo flow:
- Start CARLA server.
- Run CARLA
manual_control.py. - In another terminal, run:
python src/cot/client/run_controls_smoke.py- Press
F5to start capture, drive, then pressF6to stop capture. - Build the frontend:
cd frontend
npm run build
cd ..- Start the backend service:
python backend/app.pyOpen http://127.0.0.1:5000.
Each simulation execution creates a self-contained run directory under runs/. These generated datasets are the source of truth for validation, summary statistics, and dashboard views.
Collectors publish telemetry and events through the bus, runtime components persist run artifacts, and the backend/API layer reads those artifacts for analysis and visualization. The pipeline is designed so raw run output and derived summaries stay aligned.
Current package/layout highlights:
src/cot/bus- pub/sub and metric bus infrastructuresrc/cot/carla- CARLA-specific adapters and integration helperssrc/cot/collectors- telemetry and event collectorssrc/cot/config- configuration models/loadingsrc/cot/runtime- run loading, summaries, and runtime orchestrationbackend/app.py- Flask API + React build servingfrontend/- React + Vite dashboard source
Each run directory in runs/ contains three primary artifacts:
metadata.json- run identity, timing, and high-level run statemetrics.csv- frame/time-series telemetry values for charting and analysisevents.json- ordered run events (for example lifecycle and collision events)
Run-scoped artifacts make experiments reproducible: the same inputs and outputs can be revisited later without rerunning CARLA. This also improves analysis quality by separating data collection from visualization, enabling consistent comparisons across runs and simplifying troubleshooting.
- Flask provides API endpoints:
GET /api/runsGET /api/runs/<run_dir_name>
- API documentation:
docs/API.md - React app is built from
frontend/intofrontend/dist. - In single-server mode, Flask serves the built React app from
frontend/dist. - Legacy Flask/Chart.js dashboard is deprecated and available only as fallback at
/legacy.
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txtcd frontend
npm install
npm run buildTerminal 1:
python backend/app.pyTerminal 2:
cd frontend
npm run devOpen the Vite localhost URL shown in terminal output.
cd frontend
npm run build
cd ..
python backend/app.pyOpen http://127.0.0.1:5000.
- Run Explorer page
- Compare Runs page
- Summary stats
- Normalized telemetry charts
- Event timeline
- Side-by-side run comparison
- Speed and control comparison charts
Features shown:
- Telemetry visualization
- Event timeline
- Run metadata and summary statistics
- Normalized time-series charts
Features shown:
- Side-by-side run comparison
- Delta analysis
- Speed comparison charts
- Control input comparison charts
- Telemetry charts normalize simulation time per run so comparisons begin at t=0 regardless of CARLA world uptime.
python -m pytest -v
python -m compileall src scripts backend testsUseful validation/report commands:
python scripts/validate_run.py
python scripts/validate_runs.py
python scripts/validate_runs.py --last 3
python scripts/validate_runs.py --all
python scripts/generate_experiment_report.py <run_name>- Install and use the official CARLA
0.10release. - Start the CARLA server with
start_carla_dev.bat(or equivalent low-resolution development settings). - Activate the virtual environment used for CARLA
PythonAPI/examples. - Run
manual_control.pyto spawn/control a vehicle. - In a separate terminal, start the COT controls client:
python src/cot/client/run_controls_smoke.py- Press
F5to start run capture. - Drive the vehicle in
manual_control.pyto generate telemetry. - Press
F6to stop run capture. - Validate the latest run artifacts:
python scripts/validate_run.py- Build the frontend and start the backend service, then view results:
cd frontend
npm run build
cd ..
python backend/app.pyOpen http://127.0.0.1:5000.
Note: COT connects to CARLA over localhost:2000 (default client settings: host localhost, port 2000, timeout 10s) and attaches to an existing active vehicle. The vehicle must exist and move to produce useful telemetry. VehicleSpawner is available for helper/spawn workflows, but the primary demo path currently uses manual_control.py.
- Python
- CARLA
- Flask
- React
- Vite
- Recharts
- JSON / CSV
- pytest




