Skip to content

We provide an open source software package for AV based simulation and testing running a docker container

Notifications You must be signed in to change notification settings

WanHanxi/Naturalistic-SUMO-Gym

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

We provide an open source software package for AV based simulation and testing running a docker container

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.1%
  • Dockerfile 2.7%
  • Jupyter Notebook 0.2%