#5, First Floor, 4th Street , Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 pro@slogix.in

Office Address

  • #5, First Floor, 4th Street Dr. Subbarayan Nagar Kodambakkam, Chennai-600 024 Landmark : Samiyar Madam
  • pro@slogix.in
  • +91- 81240 01111

Social List

How to Create a real time traffic for VANET using OpenStreetMap and SUMO in NS2?
Step 1

Prerequisites to create real time traffic using SUMO and OpenStreetMap

SUMO 0.22.0

Use https://www.openstreetmap.org/ to download map

Screenshot



Step 2

Select the map that need to simulate and export it.After exporting the map,download and save the file.


Step 3

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


Step 4

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


Step 5

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


Step 6

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

Screenshot

After entering the command, sumo GUI window will pop out.