Giter VIP home page Giter VIP logo

hrl_av's Introduction

RL environment for large-scale autonomous driving tasks

drawing

This repository aims to build a general and extensible RL training and testing environment for the autonomous driving tasks. It is highlighted in the following way:

  1. We incorporate a sophisticated vehicle dynamics and the large-scale traffic and map constructed using SUMO to realize co-simulation of the ego vehicle and its surrounding environment.

  2. We design the basic RL elements in the field of autonomous driving following the interface defined in Gym, such as the state, the action, the reward function, and the reset conditions etc, which can be easily reused or modified depending on your task (see here for an example).

  3. Correspondingly, we develop an analytic model of the environment to facilitate its use in model-based RL algorithms.

  4. We also include a bunch of training and testing environments that we use, for instance, the one for integrated decision and control (see branch master); the one for centralized coordination (see branch centralized_env); ones with specific designed RL elements such as using bird view image as state (cross_nocontrol_fixedgrid_end2end), or using trajectory as action (toyota202003); and ones with different vehicle parameters, or the map (e.g. toyota202012, toyota202012_3lane, toyota202103_exp).

Getting Started

Prerequisites

Install

  1. Download this repo on your host.

  2. Register this environment (see here or follow the below steps).

    • Create a python package, say user_defined, under your installed gym path /path/to/gym/envs/

    • Copying the downloaded files endtoend.py, dynamics_and_models.py, endtoend_env_utils.py, traffic.py, together with the whole directory sumo_files to /path/to/gym/envs/user_defined.

    • Add a line in /path/to/gym/envs/user_defined/__init__.py: from gym.envs.user_defined.endtoend import CrossroadEnd2end

    • Add the following code in the end of the file /path/to/gym/envs/__init__.py

      register(
          id='CrossroadEnd2end-v0',
          entry_point='gym.envs.user_defined:CrossroadEnd2end',
          max_episode_steps=200,
      )
      

How to use

Use it just as the other embedded gym environments

env = gym.make('CrossroadEnd2end-v0')

Reference

This environment is officially proposed in the paper integrated decision and control and here's a BibTeX entry that you can use to cite it in a publication.

@article{guan2021integrated,
  title={Integrated Decision and Control: Towards Interpretable and Efficient Driving Intelligence},
  author={Guan, Yang and Ren, Yangang and Li, Shengbo Eben and Ma, Haitong and Duan, Jingliang and Cheng, Bo},
  journal={arXiv preprint arXiv:2103.10290},
  year={2021}
}

hrl_av's People

Contributors

idthanm avatar yangangren 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.