Git Product home page Git Product logo

metadrive-scenario's Introduction

Metadrive-Scenario

This repo contains diverse traffic scenarios for evaluating autonomous vehicles in simulation. All scenarios are reactive and can be ran in MetaDrive Simulator.

teaser

Currently we provide three sources of traffic scenarios:

  • Synthetic Scenarios: Maps are generated via Procedural Generation (PG). Traffic vehicles are generated and controlled according to rules
    Synthetic Dataset Statistics:
      Number of scenarios: 3000
      Number of traffic vehicles per scene: 8.9±3.1
      Block Distrubution:
        Curve: 0.156
        Straight: 0.331
        Roundabout: 0.077
        T-intersection: 0.074
        Intersection: 0.077
        Ramp (merge): 0.081
        Ramp (diverge): 0.076
        Bottleneck (merge): 0.065
        Bottleneck (diverge): 0.068
    
  • Real-world Scenarios: These scenarios are built from Waymo motion dataset. Maps and surrounding vehicles are collected and recorded in real world.
    Real-world Dataset Statistics:
      Number of scenarios: 1165
      Number of traffic vehicles per scene: 26.1±21.5
    
  • Generated Scenarios: Empowered by our generative model TrafficGen, new traffic flow can be generated and resembles the real-world data given a HD map.

🛠 Quick Start

Prerequisite: Install MetaDrive first via:

git clone https://github.com/metadriverse/metadrive.git
cd metadrive
pip install -e .

MetaDrive-Scenario Installation:

git clone [email protected]:metadriverse/metadrive-scenario.git
cd metadrive-scenario
pip install -e .

Download Dataset:

  1. Download data from https://github.com/metadriverse/metadrive-scenario/releases.
  2. Place data under metadrive-scenario/metadrive_scenario/dataset

🚕 Examples

We provide an example script:metadrive_scenario/examples/run_scenarios.py, where basic usage and APIs are described. For driving in the synthetic scenarios, run:

python metadrive_scenario/examples/run_scenarios.py  --dataset env_num_3000_start_seed_0_synthetic --scenario_start=0 --scenario_end=3000 

For driving in the real-world Waymo scenarios, run:

python metadrive_scenario/examples/run_scenarios.py  --dataset env_num_1165_waymo --scenario_start=0 --scenario_end=1000 

The scenarios will be built by replaying collected surrounding vehicles' trajectories, while you can add argument --idm_traffic to turn these vehicles into reactive ones.

For both scenario types, you can add the optional argument --manual_control to control the vehicle via w, a, s, d. Also, you can add another argumane --topdown to use 2-D birdeye-view renderer, which is built with pygame.

🏫 Documentation

Refer to Documentation of MetaDrive for detail.

📎 References

If you use MetaDrive in your own work, please cite:

@article{li2022metadrive,
  title={Metadrive: Composing diverse driving scenarios for generalizable reinforcement learning},
  author={Li, Quanyi and Peng, Zhenghao and Feng, Lan and Zhang, Qihang and Xue, Zhenghai and Zhou, Bolei},
  journal={IEEE Transactions on Pattern Analysis and Machine Intelligence},
  year={2022}
}

metadrive-scenario's People

Contributors

quanyili avatar zhoubolei avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.