Code Monkey home page Code Monkey logo

naturalistic-sumo-gym's Introduction

Naturalistic-SUMO-Gym

SumoGym is a python package to help utilize SUMO as a testing and validation platform for autonomous vehicles without the hassle of creating specific scenarios.

It uses OpenAI Gym to abstract the process of generation and running the simulation environment. There are four specific steps which are inherited from OpenAI gym environment:

env = SumoGym(scenario, choice, delta_t, render_flag)
obs = env.reset()
new_obs, reward, done, info = env.step(action)
env.close()

We also provide some sample route files for two specific scenario types: Highway and Urban. For each scenario type, we have net.xml files which are taken from real maps (e.g. the highway network is around Ann Arbor area). The rou.xml files are populated by vehicles with car-following parameters sampled from naturalistic distributions as shown in figure below: Highway IDM parameters

The paper accompanying the code is given in arXiv link.

The main branch contains the docker implementation of the sumo_gym.

System

Ubuntu 20.04

Steps

  1. Under the directory of sumo_gym_docker, build the image with docker build --tag sumo-docker .

  2. Run the image with

docker run -it --rm --env="DISPLAY" --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" --ipc=host sumo-docker bash
  1. Run the sumo_gym test file python3 sumogym_tester.py

References

https://github.com/bogaotory/docker-sumo

Current known issues

If installing in Windows, the sumo-gui implementation will not work due to a package issue. So render_flag needs to be false.

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.