Giter Club home page Giter Club logo

ngsim_imitation's Introduction

Generative Adversarial Imitation Learning on NGSIM I-80 Dataset

Maintainability Code style MIT

This repository contains three components: an improved version of ILSwiss, which is an RL training suite containing the implementation of Generative Adversarial Imitation Learning (GAIL), and two environments. The two environments both are driving simulators that use NGSIM I-80 dataset as background traffic. One of them is PPUU, the other is implemented as an imitation learning scenario based on SMARTS platform.

How to setup:

  1. Clone this repository

  2. Install python requirements with

pip install -r requirements.txt

Setup SMARTS

  1. Download the SMARTS platform as a submodule with

    git submodule init
    git submodule update
  2. Install SMARTS simulation platform in the ./SMARTS folder following its instructions

    cd ./SMARTS
    bash ./utils/setup/install_deps.sh
    echo "export SUMO_HOME=/usr/share/sumo" >> ~/.bashrc
    pip install -e .[camera-obs]
  3. Download the NGSIM dataset from: https://drive.google.com/file/d/1SILBfK2Z1LiTJ9cc4qGErq547Ax5nX8M/view?usp=share_link, and place it under smarts-imitation/

  4. Install the ngsim wrapper for smarts with

    pip install -e ./smarts-imitation
    # You may encounter the ModuleNotFoundError when running this command,
    # which is okay. Please just wait until it terminates.
    scl scenario build --clean ./smarts-imitation/ngsim
  5. Generate structured expert demonstrations with

    cd ILSwiss
    python run_experiment.py -e exp_specs/gen_expert/smarts.yaml
  6. Run GAIL with

    python run_experiment.py -e exp_specs/gail/gail_smarts.yaml

Setup PPUU

  1. Make sure you have downloaded the NGSIM dataset and placed it under smarts-imitation. Create a link to the dataset under PPUU folder:

    mkdir pytorch-PPUU/traffic-data
    ln -s $(pwd)/smarts-imitation/xy-trajectories pytorch-PPUU/traffic-data/

    Process the traffic data to dump the "state, action, cost" triple:

    cd pytorch-PPUU
    for t in 0 1 2; do python generate_trajectories.py -map i80 -time_slot $t; done
  2. Generate structured expert demonstrations with

    python run_experiment.py -e exp_specs/gen_expert/ppuu.yaml
  3. Run GAIL with

python run_experiment.py -e exp_specs/gail/gail_pppu.yaml

ngsim_imitation's People

Contributors

zbzhu99 avatar yuechengliu 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.