"A platform used for researching the coordination of autonomous vehicles to optimize the efficiency of transport and other collaborative tasks."
sudo add-apt-repository ppa:sumo/stable
sudo apt-get update
sudo apt-get install sumo sumo-tools sumo-doc
Don't forget to set SUMO_HOME variable (default sumo installation path is /usr/share/sumo)
echo 'export SUMO_HOME="/usr/share/sumo"' >> ~/.bashrc
source ~/.bashrc
Important: for a huge performance boost (~8x) with Libsumo, you can declare the variable:
export LIBSUMO_AS_TRACI=1
export SUMO_HOME="/opt/homebrew/opt/sumo/share/sumo"
Notice that you will not be able to run with sumo-gui or with multiple simulations in parallel if this is active (more details).
Check experiments for examples on how to instantiate an environment.
python3 experiments/simulator.py -config config/port.ini
The default observation for each traffic signal agent is a vector:
obs = []
You can define your own observation by implementing a class that inherits from ObservationFunction and passing it to the environment constructor.
The action space is discrete.
It is also possible to implement your own reward function:
env = SumoEnvironment(..., reward_fn=my_reward_fn)