Read Data from Dataset
Setting up Argoverse dataset
To run the
drive_in_argoverse.py example, you need to install the argoverse-api and download the map files.
Install argoverse-api repo
Clone the official argoverse API repo to some place then install it:
git clone https://github.com/argoai/argoverse-api.git cd argoverse-api pip install -e .
Download and extract argoverse map files
cd argoverse-api wget https://s3.amazonaws.com/argoai-argoverse/hd_maps.tar.gz tar -xzvf hd_maps.tar.gz
After unzip the map files, your directory structure should look like this:
argoverse-api └── map_files └── license └── argoverse └── data_loading └── evaluation └── map_representation └── utils └── visualization ...
Enjoy Driving in Real Town!
You can launch a script to drive manually in a town in Pittsburgh with replayed traffic flow recorded in Argoverse. Note: Press T to launch auto-driving! Enjoy!
# Make sure current folder does not have a sub-folder named metadrive python -m metadrive.examples.drive_in_argoverse
Specify the Data to Replay
MetaDrive currently supports replaying the map and traffic flow in the sample dataset of argoverse-tracking. We will add more scenarios for customized selection in the near future. As shown in ArgoverseEnv Class, we use a few parameters to specify the data to be loaded. Here is the detailed explanation of those parameters:
argoverse_city: The shortcut of the specified city.
radius: Only the roads and traffic within the circle centering in
argoverse_map_radiuswill be loaded.
argoverse_spawn_lane_index: Node index indicating where the ego agent is initialized.
argoverse_destination: Node index indicating the destination of the ego agent.
argoverse_log_id: We select one sample of argoverse-tracking data with this ID as the folder name.