Giter Club home page Giter Club logo

trajgen's Introduction

TrajGen: Generating Realistic and Diverse Trajectories With Reactive and Feasible Agent Behaviors for Autonomous Driving

Implementation of the TrajGen and I-SIM simulator based on Interaction Dataset. TrajGen is a two-stage trajectory generation framework, which can capture realistic and diverse behaviors directly from human demonstration.

If you find this code useful, please reference in your paper:

@article{zhang2022trajgen,
  title={TrajGen: Generating Realistic and Diverse Trajectories With Reactive and Feasible Agent Behaviors for Autonomous Driving},
  author={Zhang, Qichao and Gao, Yinfeng and Zhang, Yikang and Guo, Youtian and Ding, Dawei and Wang, Yunpeng and Sun, Peng and Zhao, Dongbin},
  journal={IEEE Transactions on Intelligent Transportation Systems},
  year={2022},
  doi={10.1109/TITS.2022.3202185}
}

Manual Instructions

To properly run TrajGen on your system, you should clone this repository, and follow the instruction below to install the dependencies for both I-SIM and TrajGen.

1. Dependencies for I-SIM simulator

Since the HD maps of Interaction Dataset uses the format of Lanelet2, you need to build Lanelet2 Docker first, we provide a modified version of Lanelet2 in our repo:

cd Lanelet2
docker build -t isim .

After build, run docker container and do port mapping, we use port 5557-5561 as example:

docker run -it -e DISPLAY -p 5557-5561:5557-5561 -v $path for TrajGen$:/home/developer/workspace/interaction-dataset-master -v /tmp/.X11-unix:/tmp/.X11-unix --user="$(id --user):$(id --group)" --name isim57 isim:latest bash

Update dependencies:

sudo apt update
sudo apt install python-tk

Check wheather I-SIM can properly run:

cd interaction-dataset-master/python/interaction_gym/
python main_visualize_data.py "DR_USA_Intersection_EP0"

2. Dependencies for TrajGen

TrajGen requires python3(>=3.7) and tensorflow-gpu(>=1.14), as for other packages, please run:

pip install -r requirements.txt

Usage

This repo has contained predicted trajcetories generated by LaneGCN with Routeloss, which is the first stage of TrajGen framework. If you want to further understand how this work, please check LaneGCN with Routeloss. We also provide a pretrained model for testing.

Qucik Start

To train or test TrajGen, your have to run I-SIM manually, we assume that I-SIM runs at port 5557 inside a docker container:

docker exec -it isim57 bash
cd interaction-dataset-master/python/interaction_gym/
python interaction_env.py --port=5557

Train TrajGen:

python python/interaction_rl/main.py --port=5557

Visualize training curves:

python python/interaction_rl/results/rl/$ports$/visualize_results.py

Test TrajGen:

python python/interaction_rl/main.py --port=5557 --test

Print test results:

python python/interaction_rl/results/test/print_results.py

Acknowledgement

We appreciate the following github repos for their valuable code base or dataset:

https://github.com/fzi-forschungszentrum-informatik/Lanelet2

https://github.com/interaction-dataset/interaction-dataset

trajgen's People

Contributors

gaoyinfeng avatar

Stargazers

 avatar Crocodile avatar  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.