Introduction

Our simulator is compatible with the nuScenes maps. On this page, we document the steps needed to use our preprocessed map intersections or generate new ones from the official nuScenes Maps.

Getting the Preprocessed Maps

The JSON and PTH versions of the preprocessed maps are not publicly available at the moment. Please use the steps described below to generate the maps.

Preprocessing Maps

We provide a set of preprocessed maps from nuScenes for use with our simulator. Download the map expansion pack from their website if you don't have the *.pth map files. If you have the *.json files then run the following code:

$ python -m sdriving.nuscenes.nusc fix_json_maps --glob_path="./map_jsons/*.json"

You might need to run it 3 times (don't worry it's super fast). This will clean up the provided JSON files. Keep running it if you get any message other than Fixing *.json...

Next, preprocess these JSON files so that the Simulator can directly read them.

$ python -m sdriving.nuscenes.nusc preprocess_maps nuScenes-map-expansion-v1.2 --glob_path="./map_jsons/*.json"

Interactive Map Generation

We provide a GUI application to convert a patch of the nuScenes map into a drivable environment compatible with our simulator.

$ python -m sdriving.nuscenes.nusc env_create --map-folder </path/to/nuscenes/maps>

Controls

  1. Left Click: Place a starting position on the patch. This point is automatically associated with the nearest spline

  2. Right Click: Place a traffic signal associated with all the starting points which don't have an associated traffic signal

  3. Press o: Flip the color of the traffic signal to be placed next

  4. Press 1: Remove the last placed point

  5. Press 2: Display the associated paths obtained by BFS

  6. Press t: Save the map

Some known shortcomings

  • Every point needs to be associated with a traffic signal

  • One path can have only a single traffic signal

We are working on fixing these shortcomings, however, there are some neat tricks to circumvent these. Please open an issue on GitHub, and we will try to provide a patch for that.

Last updated