nuscenes2mcap
May 27, 2026 ยท View on GitHub
Introduction
nuScenes is a large-scale dataset of autonomous driving in urban environments, provided free for non-commercial use. This project provides helper scripts to download the nuScenes dataset and convert scenes into MCAP files for easy viewing in tools such as Foxglove.
Usage
Converting the nuScenes data to MCAP
- Download the nuScenes mini dataset. (This is a public bucket hosting the official files and does not require an account or login.)
- Extract the following files into the
data/directory:can_bus.ziptodata/nuScenes-map-expansion-v1.3.ziptodata/mapsv1.0-mini.tgztodata/
- Build and run the converter container with
./convert.sh
Uploading data and events to Foxglove Data Platform
If you have a Foxglove API key, you can use it to upload your scene data with:
docker build -t mcap_converter .
export FOXGLOVE_API_KEY=<your secret token>
docker run -e FOXGLOVE_API_KEY -v $(pwd)/output:/output \
mcap_converter python3 upload_mcap.py /output
This repo also contains a script that can create synthetic events from the MCAP data.
docker run -e FOXGLOVE_API_KEY -v $(pwd)/output:/output \
mcap_converter python3 upload_events.py /output
Updating Protobuf definitions
pip install mypy-protobuf
protoc --python_out=. --mypy_out=. --proto_path /path/to/foxglove/schemas/schemas/proto/ /path/to/foxglove/schemas/schemas/proto/foxglove/*.proto
License
nuscenes2mcap is licensed under the MIT License.