A mmWave mobility simulator combining Open Street Map, NS3, and SUMO
-
Install Docker
-
Pull the testbed image:
docker pull jcuthbert/mobility-testbed
-
Pull the GitHub repo and locate the
dockerOutput
folder this will be where the simulator outputs; also within it is auserFiles
folder where the simulator will pull the configuration files. Below is an example of the three input files for the testbed:-
config.py
is provided in the userFiles folder and can be edited to change simulation parameters -
yourMap.osm.pbf
file is an open street map file, information on downloading map segments can be found here -
yourCoordinates.csv
contains lat long coordinates, two sets of coordinates define areas to cut out of the .osm.pbf file; the default format is below; however this can be configured inconfig.py
lat, long lat, long
example:
40.0077,-75.1339 29.7863,-95.3889
-
-
Once you have configured the simulation you want to run and gotten the map and the coordinates you can use the following command to start the docker image; which will enter you into an interactive shell with its own "file system". The
-v
option is creating a local volume; which links your dockerOutput folder to the/home/testbed/outputMaster
directory in the container.docker container run --interactive --tty -v ..YOUR-PATH../dockerOutput:/home/testbed/outputMaster jcuthbert/mobility-testbed:latest /bin/bash
-
At this point the container should be running; run the following commands to activate the python virtual environment and begin the simulation. Note: if you want to edit your
config.py
simulation parameters while the image is running edit/home/testbed/src/config.py
within the containers interactive shell.source ./bin/activate python src/main.py
-
The simulation should begin; with status messages on the command line. As it runs output files and intermediatry files such as the SUMO route files will begin being generated in the
dockerOutput
shared volume. Each time you begin the simulation a new timestamped subfolder will be created.Although a different version of the ns3-mmwave than used in the simulator this is a helpful page for understanding the ns3 output files.
-
Get this repository; there is a dockerfile with all the build instructions in it; however you will need two additional repositories for the testbed to work: a fork of the ns3 MmWave standalone, and a c++ json library.
-
First create a new directory in the
mobility-testbed
calledns3
. Within the new directory get this fork of the ns3 WmWave respository-- The only change to the original is an enviroment variable, and the inclusion of thens2TraceInterface.cc
script for taking in simulation parameters from python. -
Again within the
ns3
directory you created get this json library-- note that you will want the standalone version. -
At this point you should have the following within the
ns3
directory: -
Build the docker file with the command
docker build . -t mobility-testbed
. You should see a new image appear when you run the command:docker image list
. As needed refer to the previous instructions for setting up the testbed with this new image; ommiting the pulling of the public image.