Skip to content

wangtuo0820/nuscenes2bag

 
 

Repository files navigation

nuScenes2Bag

  • Ubuntu 18.04 Melodic:
  • Ubuntu 16.04 Kinetic:

Simple C++ tool for converting the nuScenes dataset from Aptiv.

The tool loads the json metadata and then the sample files for each scene. The sample are converted in a suitable ROS msg and written to a bag. TF tree is also written.

Probably the original dataset is also collected by Aptiv using ROS, so most data has the same format.

nuscene_rosbag_preview

Install

The master branch targets Ubuntu 18.04 and newer. The ubuntu_1604 branch uses C++11 and has been tested on Ubuntu 16.04.

The tool is a normal ROS package. Place it under a workspace and build it with catkin.

Usage

Command-line arguments: --dataroot: The path to the directory that contains the 'maps', 'samples' and 'sweeps'. --version: (optional) The sub-directory that contains the metadata .json files. Default = "v1.0-mini"

Converting the 'mini' dataset:

Convert one scene to a bag file, saved in a new directory: Scene '0061' will be saved to 'nuscenes_bags/61.bag'

rosrun nuscenes2bag nuscenes2bag --scene_number 0061 --dataroot /path/to/nuscenes_mini_meta_v1.0/ --out nuscenes_bags/

Convert the entire dataset to bag files: This processes 4 scenes simultaneously, however the scene numbers are not processed in numerical order.

rosrun nuscenes2bag nuscenes2bag --dataroot /path/to/nuscenes_mini_meta_v1.0/ --out nuscenes_bags/ --jobs 4

Converting other datasets:

Convert a dataset with the metadata in a sub-directory called 'v2.0':

rosrun nuscenes2bag nuscenes2bag --dataroot /path/to/nuscenes_data_v2.0/ --version v2.0 --out nuscenes_bags/ --jobs 4

Status

Currently work in progress

  • Image support
  • Pointcloud support
  • Radar support
  • EgoPose and TF support
  • Show progress
  • Better usability

Create an Github issue for suggestion, bug and requests.

Thirdparty

Built using:

Authors

About

nuScenes dataset to rosbag format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 94.7%
  • CMake 3.9%
  • Other 1.4%