rllibsumoutils
rllibsumoutils copied to clipboard
Python3 library able to connect the RLLIB framework with the SUMO simulator.
RLLIB+SUMO Utils
Python3 library able to connect the RLLIB framework with the SUMO simulator.
Contact: Lara CODECA [[email protected]]
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.
Minimum Requirements
Tested with
- Eclipse SUMO Version 1.9.2
- With 1.9.2 the options
scenario_config['sumo_config']['sumo_connector'] = 'libsumo'withscenario_config['sumo_config']['trace_file'] = Truedoes not work, but the bugh has already been fixed in SUMO issue 8671. If you need to enable SUMO tracing with 1.9.2, you need to usescenario_config['sumo_config']['sumo_connector'] = 'traci'
- With 1.9.2 the options
- RLlib Version 1.3.0
Installation
- Install:
pip3 install .from the root directory, orpython3 setup.py install - Development install:
pip3 install -e .orpython3 setup.py develop
Note: rtree library
To use rtree, libspatialindex-dev is required to be installed.
[In Ubuntu/Debian] sudo apt install libspatialindex-dev python-rtree and then pip install rtree
Example
- Given the ~under development~ status of the project, some examples are provided.
example/scenario- Simple SUMO scenario.
example/marlenvironment.py- Example of MARL environment implemented using RLLIB (SUMOTestMultiAgentEnv)
example/train.py- Example of PPO trainer using SUMOTestMultiAgentEnv
- How to:
python3 train.py
Docker Environment
See RLLIB SUMO Docker for details on my development and learning environment.