Prerequisites to create real time traffic using SUMO and OpenStreetMap
SUMO 0.22.0
Use https://www.openstreetmap.org/ to download map
Select the map that need to simulate and export it.After exporting the map,download and save the file.
Road network:
netconvert imports the road network stored in “map.osm” and stores the SUMO-network generated from this data into “map.net.xml” from this data into “map.net.xml”
Netconvert –osm-files map.osm -o map.net.xml
Copy the typemap.xml file and traceExporter.py file
Click https://sumo.dlr.de/wiki/Networks/Import/OpenStreetMap copy the typemap file and save it to your working directory with the name typemap.xml
Copy the traceExporter.py file from sumo-0.22.0/tools in working directory
Node Creation
polyconvert –net-file map.net.xml –osm-files map.osm –type-file typemap.xml -o map.poly.xml
python /home/kunal/sumo-0.22.0/tools/trip/randomTrips.py -n map.net.xml -e 100 -l
python /home/kunal/sumo-0.22.0/tools/trip/randomTrips.py -n map.net.xml -r map.rou.xml -e 100 -l
File Configuration
Now need to make a sumo.cfg file to view the map using sumo-gui.
Now save the above file with a file name. I saved it with map.sumo.cfg
Now run the following command from terminal
sumo-gui map.sumo.cfg
After entering the command, sumo GUI window will pop out.