Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 1.9 KB

README.md

File metadata and controls

48 lines (35 loc) · 1.9 KB

nuscenes2mcap

Convert nuScenes data into MCAP format

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

  1. Download the nuScenes mini dataset. You will need to make an account and agree to the terms of use.
  2. Extract the following files into the data/ directory:
    1. can_bus.zip to data/
    2. nuScenes-map-expansion-v1.3.zip to data/maps
    3. v1.0-mini.tgz to data/
  3. Build and run the converter container with ./convert_mini_scenes.sh

Uploading data and events to Foxglove Data Platform

If you have a Foxglove Data Platform API key, you can use it to upload your scene data with:

docker build -t mcap_converter .
export FOXGLOVE_DATA_PLATFORM_TOKEN=<your secret token>
docker run -e FOXGLOVE_DATA_PLATFORM_TOKEN -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_DATA_PLATFORM_TOKEN -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.

Stay in touch

Join our Slack channel to ask questions, share feedback, and stay up to date on what our team is working on.