GithubHelp home page GithubHelp logo

arick6 / drift_drl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from caipeide/drift_drl

0.0 0.0 0.0 43.57 MB

High-speed Autonomous Drifting with Deep Reinforcement Learning

License: MIT License

Shell 0.43% Python 99.57%

drift_drl's Introduction

High-speed Autonomous Drifting with Deep Reinforcement Learning

IEEE Robotics and Automation Letters & ICRA-2020

๐Ÿ–ฅ๏ธ Homepage ๐Ÿ“œ Paper

High-speed drifting cornering by the proposed deep RL controller High-speed drifting cornering by the proposed deep RL controller High-speed drifting cornering by the proposed deep RL controller

Requirements

  1. Tested on Ubuntu 16.04 and Ubuntu 20.04.
  2. Nvidia GPU equipped, and driver Installed. Tested on GTX 1080Ti.
  3. Install Anaconda, which is a package manager, environment manager, and Python distribution.
  4. Install the environment:
conda env create -f environment_drift.yaml

This command will create a conda environment named drift

Reference trajectorires for seven maps

Seven maps designed in this work

Reference trajectories for the maps are located in code/ref_trajectory

traj_0: for map(a), for first-stage training.

traj_1...traj_5: for map(b-f), for second-stage training.

traj_6: for map(g), for evaluation

Start the Simulator

We build the simulator based on Carla 0.9.5. You can download our build version from this link.

Then add these two lines to your ~/.bashrc (assume you download the simulator to Downloads folder):

export PYTHONPATH=$PYTHONPATH:~/Downloads/CARLA_DRIFT_0.9.5/PythonAPI/carla/dist/carla-0.9.5-py3.5-linux-x86_64.egg
export PYTHONPATH=$PYTHONPATH:~/Downloads/CARLA_DRIFT_0.9.5/PythonAPI/carla/

Then open a new terminal and start the simulator:

cd ~/Downloads/CARLA_DRIFT_0.9.5
./CarlaUE4.sh /Game/Carla/ExportedMaps/test_refined

You can use W A S D and mouse to navigate in the simulator. Press Alt+Tab to restore your cursor.

Test the Model

Model weights are located in weights/, where four kinds of models are included: SAC, SAC-WOS, DDPG, DQN

Note that sac-stg1 and sac-stg2 are different stages of our SAC controller during training. sac-stg2 is the final version and sac-stg1 are only trained on map(a).

To test the models, make sure you have started the simulator, then open a new terminal and do the followings:

cd code
conda activate drift
sh test.sh

Then different models will be tested on map(g). The driving data (timestamp, speed, location, heading, slip angle, control commands, etc.) will be recorded in code/test/ after the testing process.

If you want to test a single model, for example, DQN:

cd code
conda activate drift
python test_dqn.py

Citation

Please consider to cite our paper if this work helps:

@article{Cai2020HighSpeedAD,
  title={High-Speed Autonomous Drifting With Deep Reinforcement Learning},
  author={Peide Cai and X. Mei and L. Tai and Yuxiang Sun and M. Liu},
  journal={IEEE Robotics and Automation Letters},
  year={2020},
  volume={5},
  pages={1247-1254}
}

drift_drl's People

Contributors

caipeide 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.