SUMO allows for traffic systems to be modelled. Click Here to find out more about SUMO.
How to Connect to SUMO¶
Connecting Traffic3D with SUMO allows for SUMO simulations to be viewed and controlled in Traffic3D using the settings from the Sumo Manager. Currently, this features allows Traffic3D and SUMO to control the following:
- Traffic Flow
- Traffic Lights
The buildings and lampposts are automatically generated and will adapt to the road network. Once running, Traffic3D will render the vehicles on the road according to their positions in SUMO. To connect to SUMO, follow the instructions below:
- Within Unity, load the Sumo Scene which is found at
- Edit the Sumo Manager options within the
- Navigate to the
Assets/Sumo/folder and remove the original
- Find or Create a SUMO network (
.net file) and a SUMO demand (
.rou) file to use.
- In NetEdit, with the SUMO network and demand file loaded, press
Edit > Open in SUMO-GUI.
- Save the configuration in SumoGui with
File > Save Configurationand close SumoGui.
Add the following xml within the
configurationxml tag in the
.sumocfgfile created when saving the configuration in the previous step.
<traci_server> <remote-port value="4001"/> </traci_server> <step-length value="0.016" />
Edit the port if needed according to the port displayed in the
Sumo Manager. The step length is your simulation time. The current value of
0.016is close to real time, increase this if needed.
- Get the
.roufiles created in the previous steps, copy them into the
Assets/Sumo/folder and rename them to
- Open SumoGui, press
File > Open Simulationand use the configuration file that was previously edited. The SumoGui console should output
***Starting server on port 4001 ***.
- Finally press the play button on Unity and it should load the SUMO Network into Traffic3D with the chosen options from