Sie sind auf Seite 1von 7

Jun.-Prof. Dr.-Ing.

Christoph Sommer
Cooperative Mobile Systems – CCS Labs

Cooperative Mobile Systems [CMS]

Installation
Tobias Hardes
2019

1 Goal

This handout will guide you in the process of getting into OMNeT++.
We provide a virtual machine, which we call Instant-CMS. You can download this VM and use it for all lab
sessions or start it directly from from the IRB computers. By downloading this VM, you still need to install
Veins (see section 4) to be ready for the first lab session. For further details please refer to section 7.
As an alternative, we provide this guide to install all required tools either natively on your personal computer,
or as a virtual machine (e.g. VMware) on your own. This helps you to get familiar with the tools and with
the used operating system.
To address any technical difficulties while you set up your system refer to the Q&As omnetpp1 tag in Stack-
Overflow or have a look to the OMNeT++ installation guide2

Attention
We do not make any warranties about the completeness, reliability and accuracy of the information in
this document. Any action you take upon the information in this document is strictly at your own risk
and we will not be liable for any losses and damages.
If you are setting up your own system, make sure to use English as the system language for better
support from our side.

1
https://stackoverflow.com/search?q=omnetpp
2
https://omnetpp.org/doc/omnetpp/InstallGuide.pdf

Page 1 of 7
2 Preparations

For best support and compatibility it is necessary to use a Linux-based operating system, e.g., Ubuntu. You
can set up the system either natively on your personal computer, or as a virtual machine, e.g, VMware or
VirtualBox. To get better performance from your virtual machine activate hardware acceleration (VT-x, or
AMD-V) in the BIOS of your computer. Furthermore, it is recommended to install the support tools of the
used virtualization software (i.e., VMware Tools for VMware, Guest Additions for VirtualBox).
System requirements:
• Operating system: Linux (e.g., Ubuntu LTS 18.04.)
• OMNeT++ 5.4.1 (Discrete Event Simulator)3
• SUMO 1.0.1 (Traffic simulator platform)4
• Veins 5 alpha 1 (Framework for vehicular network simulations)5
When downloading the required tools make sure you get the correct version as source files mentioned in the
list above. We provide a mirror, where you can find all tools to download: https://intern.ccs-labs.org/
mirror/ Set up your machine and install the required software: For Ubuntu and derivatives, the following
packages are needed. Other systems will likely ship with similarly named packages.

Ubuntu and derivatives


sudo apt install build-essential gcc g++ bison flex perl tcl-dev tk-dev \
blt libxml2-dev zlib1g-dev default-jre doxygen graphviz libwebkitgtk-1.0-0 \
openmpi-bin libopenmpi-dev libpcap-dev autoconf automake libtool doxygen \
libproj-dev libfox-1.6-dev libgdal-dev libxerces-c-dev qt4-dev-tools \
libopenscenegraph-3.4-dev openscenegraph-plugin-osgearth graphviz \
qt5-default tcl-dev tk-dev libxml2-dev zlib1g-dev default-jre libwebkitgtk-3.0-0 \
libosgearth-dev

2 Installing OMNeT++

1. Extract the OMNeT++ source files to a directory of your choice, e.g. /home/username/software/omnetpp-
5.4.1. We’ll call this directory <your-dir> in the remainder of this document.
2. Navigate into the extracted OMNeT++ directory: cd <your-dir>/omnetpp-5.4.1
3. Add OMNeT++/bin directory to your path by executing:
<your-dir>/omnetpp-5.4.1$ source setenv
Additionally the following line to the bottom of ∼/.profile file:
export PATH=$PATH:/home/<your-dir>/omnetpp-5.4.1/bin
4. To apply the changes you made in the ∼/.profile file, please logout and login again
5. Configure the makefiles for OMNeT++: <your-dir>/omnetpp-5.4.1$ ./configure
3
https://omnetpp.org/omnetpp
4
https://sourceforge.net/projects/sumo/files/sumo/
5
http://veins.car2x.org/download/

CMS Lab – Installation Page 2 of 7


6. Compile the code: <your-dir>/omnetpp-5.4.1$ make
Note: You can use make -j <number-of-cores> to compile the software with multiple cores. For
speed ups use the same option in the subsequent steps requiring compilation.
Note: This process can take a long time. As OMNeT++ is not needed to install SUMO, feel free to, e.g.,
minimize this window and continue with the next step.

3 Installing SUMO

1. Extract the SUMO source files to a directory of your choice: <your-dir>


2. Navigate into the extracted SUMO directory: cd <your-dir>/sumo-1.0.1
3. Configure the makefiles for SUMO: <your-dir>/sumo-1.0.1$ ./configure
4. Compile the code: <your-dir>/sumo-1.0.1$ make
Note: You can use make -j <number-of-cores> to compile the software with multiple cores.
5. Add SUMO/bin directory to your path by adding the following line to the bottom of ∼/.profile file
(requires relogin):
export PATH=$PATH:/home/<your-dir>/sumo-1.0.1/bin
Note: This process can take a long time. As SUMO is not needed right away, feel free to, e.g., minimize this
window and continue with the next step.

4 Installing and Running Veins (using the command line)

In order to continue with this step, the installation of OMNeT++ needs to be done.
1. Extract the Veins source files to a directory of your choice: <your-dir>
2. Navigate into the extracted Veins directory: cd <your-dir>/veins-veins-5a1
3. Configure the makefiles for Veins: <your-dir>/veins-veins-5a1$ ./configure
4. Compile the code: <your-dir>/veins-veins-5a1$ make
Note: You can use make -j <number-of-cores> to compile the software with multiple cores.
5. In a terminal, start the daemon6 by executing: <your-dir>/veins-veins-5a1$ ./sumo-launchd.py
-vv
6. In another terminal, navigate into the directory containing the Veins tutorial simulation:
cd <your-dir>/veins-veins-5a1/examples/veins
7. Run the tutorial simulation <your-dir>/veins-veins-5a1/examples/veins$ ./run

5 Running Veins (using the IDE)

1. To import Veins into OMNeT++, start the OMNeT++ IDE (as in the previous step) and open the work-
bench. Then, from the menu bar select File → Import → General → Existing Projects into Workspace
select the Veins directory: <your-dir>/veins-veins-5a1/.
6
http://veins.car2x.org/documentation/sumo-launchd/

CMS Lab – Installation Page 3 of 7


2. In a terminal, start the daemon7 launchD by executing:
<your-dir>/veins-veins-5a1$ ./sumo-launchd.py -vv
3. In the OMNeT++ IDE, inside the Veins project find the examples/veins/ directory, right-click on
omnetpp.ini file and select Run As → OMNeT++ Simulation.

6 Installing R

In the lab, we’ll evaluate simulations by recording and analyzing data. For the statistical computation, you
can use different tools and projects like R or Python (pyplot). We’ll use R in the labs, but you’re welcome
to use any other solution you like. R is a free software environment for statistical computing and graphics.
For Ubuntu and derivatives, the following packages are needed. Other systems will likely ship with similarly
packages:

Ubuntu and derivatives


sudo apt install r-base r-recommended

In order to prepare the R environment for the lab, the following statements need to be executed to install
the required R packages:

Installing R packages

1 <your-dir>% R
2 > install.packages(’ggplot2’,dependencies = TRUE, &
repos=c(’http://cran.uni-muenster.de/’))
3 > install.packages(’sqldf’,dependencies = TRUE), &
repos=c(’http://cran.uni-muenster.de/’))
4 > install.packages(’Hmisc’,dependencies = TRUE), &
repos=c(’http://cran.uni-muenster.de/’))
5 > q()

The setup might ask you whether a personal library shall be used. In this case select yes. You can use any
type of text-editor to write your R scripts, however the RStudio8 IDE is a good starting point.

8
https://www.rstudio.com/products/rstudio/download/

CMS Lab – Installation Page 4 of 7


7 Usage of the VM

To run instant-cms on your own device, you can find the virtual machine as an .ova-file on the file server
as well:
smb://fs-cifs.uni-paderborn.de/upb/groups/fg-cms/public/share/(Mac OS)
For Windows, please type the following in your Explorer address line:
\\fs-cifs.uni-paderborn.de\upb\groups\fg-cms\public\share

To be able to mount the network share you have to enter your IMT credentials. Make sure you add ad\ before
your username like shown in figure 1.

Figure 1: To be able to use your IMT login you have to add ad\ in front of your username.

If you have problems to mount the location, please refer to the IRB wiki page.9

9
https://hilfe.uni-paderborn.de/Netzlaufwerk_einbinden

CMS Lab – Installation Page 5 of 7


7.1 Running Instant-CMS on IRB infrastructure

Before you login on an IRB machine, you need to select the CMS Sessions entry from the drop down list,
which is labeled with Sitzung or Session. An example is shown in Figure 2

Figure 2: Select the CMS Session from the list, which is labelled with Session.

After you entered your username and password you’ll be asked to choose a virtual machine. The one we
need for the CMS lab is labelled CMS Lab.
By doing so the VM is booting, which takes a while. Follow the instruction on the screen until you’re logged
in.
The machine is configured with everything you need for the lab. The only framework missing is Veins.

Attention
While you’re working on the machine, you need to make sure that you keep your data persistent, as
the machine is reset after a shutdown. For this you can store all data in the data directory, which is
attached to the /home/veins/data . An example is shown in Figure 3.

The installation of Veins is left as an exercise (see sections 4 and 5). Make sure the Veins installation is stored
in the data directory, so you can use it in the next week as well without a new installation.
Hint: If the VM freezes you can use the key combination right ctrl+q to get access to the command bar
of VirtualBox. Here you can always shut down the machine and restart it.

7.2 Running Instant-CMS on an own device

After downloading the virtual machine (ova), you can import it into software like Oracle VM VirtualBox,
VMware Workstation Player, or any software supporting the Open Virtualization Format. The installation of
Veins is left as an exercise (see sections 4 and 5).

CMS Lab – Installation Page 6 of 7


Figure 3: The /home/veins/data directory is attached to the data directory of your IRB account. Everything
you store here will be available after you shutdown the virtual machine.

Contact

• Tobias Hardes: http://www.ccs-labs.org/~hardes/


• CMS Website: http://www.ccs-labs.org/teaching/cms/2018s/

CMS Lab – Installation Page 7 of 7

Das könnte Ihnen auch gefallen