|
|
|
|
|
# Table of Contents
|
|
|
|
|
|
1. [Foreword](#org9bef77f)
|
|
|
2. [Glossary](#org7461143)
|
|
|
3. [Preliminary notes](#org8dd3044)
|
|
|
4. [The steps to run CUSCUS](#org90b6f77)
|
|
|
1. [First Step - Set up a virtual machine with Ubuntu 14.04.3 (or do it with a real machine)](#orga0f98d3)
|
|
|
2. [Second Step - Install NS-3 (following the NS-3 site instructions)](#org63b7631)
|
|
|
3. [Third Step - Install FL-AIR (following the FL-AIR site instructions)](#orgf56de82)
|
|
|
1. [Extra - Make sure that](#orgc73873b)
|
|
|
4. [Fourth Step](#org24d56b4)
|
|
|
|
|
|
|
|
|
|
|
|
<a id="org9bef77f"></a>
|
|
|
|
|
|
# Foreword
|
|
|
|
|
|
whenever you found written here something like "it doesn't work" in
|
|
|
a particular way or "it works" in another, plase consider that these
|
|
|
are our *experiences*.
|
|
|
|
|
|
If you find a workaround, some new insights, etc…please let us know.
|
|
|
|
|
|
|
|
|
<a id="org7461143"></a>
|
|
|
|
|
|
# Glossary
|
|
|
|
|
|
- **FLAIR:** Framework Libre Air (The Control Part)
|
|
|
- **NS3:** The Network Simulator 3 (The Network Part)
|
|
|
|
|
|
|
|
|
<a id="org8dd3044"></a>
|
|
|
|
|
|
# Preliminary notes
|
|
|
|
|
|
- Tested with \*buntu 14.04 -> OK
|
|
|
- Tested with ArchLinux (rolling release) -> NOPE (GLIBC mismatch in the robomap3 toolchain (FLAIR stuff))
|
|
|
- Tested with \*buntu 16.10 -> nope, as before
|
|
|
|
|
|
**USE** `/bin/bash`. Other shells do not work for the FLAIR framework. Save the hassle and use bash temporarely.
|
|
|
|
|
|
|
|
|
<a id="org90b6f77"></a>
|
|
|
|
|
|
# The steps to run CUSCUS
|
|
|
|
|
|
|
|
|
<a id="orga0f98d3"></a>
|
|
|
|
|
|
## First Step - Set up a virtual machine with Ubuntu 14.04.3 (or do it with a real machine)
|
|
|
|
|
|
a kind suggestion: use [Vagrant](https://www.vagrantup.com/) to easily set up your VMs.
|
|
|
|
|
|
We used this [box](https://app.vagrantup.com/ubuntu/boxes/trusty64).
|
|
|
|
|
|
It takes up a lot of space, please reserve at least `30GB`.
|
|
|
|
|
|
|
|
|
<a id="org63b7631"></a>
|
|
|
|
|
|
## Second Step - Install [NS-3](https://www.nsnam.org) (following the NS-3 site instructions)
|
|
|
|
|
|
This [tutorial](https://www.nsnam.org/docs/tutorial/html/getting-started.html)
|
|
|
is enough to get NS3 up and running.
|
|
|
|
|
|
1. install "vtun" and "lxc" packages ( I installedd all the suggested packages)
|
|
|
- `sudo apt-get install vtun lxc`
|
|
|
|
|
|
2. Better safe than sorry:
|
|
|
- `sudo apt-get install gcc g++ python python-dev mercurial bzr gdb valgrind gsl-bin libgsl0-dev libgsl0ldbl flex bison tcpdump sqlite sqlite3 libsqlite3-dev libxml2 libxml2-dev libgtk2.0-0 libgtk2.0-dev uncrustify doxygen graphviz imagemagick texlive texlive-latex-extra texlive-generic-extra texlive-generic-recommended texinfo dia texlive texlive-latex-extra texlive-extra-utils texlive-generic-recommended texi2html python-pygraphviz python-kiwi python-pygoocanvas libgoocanvas-dev python-pygccxml`
|
|
|
|
|
|
3. Please follow:
|
|
|
- <https://askubuntu.com/questions/466651/how-do-i-use-the-latest-gcc-on-ubuntu?answertab=votes#tab-top>
|
|
|
- REASON: ns3>2.27 NEEDS gcc4.9 and 14.04 has only 4.8
|
|
|
- I had already enough headaches to make it running this way.
|
|
|
The other way around (use a more modern distro) collided with
|
|
|
the Flair toolchain (that I cannot easily modify)
|
|
|
|
|
|
4. Install NS-3 as per [tutorial](https://www.nsnam.org/docs/tutorial/html/getting-started.html).
|
|
|
- Configure NS-3 with waf: –enable-sudo –enable-tests –enable-examples
|
|
|
- To save time, do it *before* running waf in the tutorial.
|
|
|
|
|
|
- Save your ns3 main path as $NS3<sub>MAIN</sub><sub>PATH</sub>
|
|
|
- echo `export <place where waf is located> NS3_MAIN_PATH` in your `.bashrc`
|
|
|
|
|
|
5. Install the NS3 CUSCUS mod:
|
|
|
- Copy the files CUSCUS/mods/ns3-src/src/mobility/model/uav-link-mobility-model.cc & .h into the directory $NS3<sub>MAIN</sub><sub>PATH</sub>/src/mobility/model/
|
|
|
- Modify the text file &NS3<sub>MAIN</sub><sub>PATH</sub>/src/mobility/wscript in order to include the new files.
|
|
|
- In CUSCUS/mods/ns3-src/src/mobility/wscript there is an example;
|
|
|
- it can be different from the actual file that you have depending on the models present on ns-3.
|
|
|
|
|
|
- Basically you have to add in "wscript" in the section "mobility.source" and "headers.source" the two source files.
|
|
|
- Copy the files CUSCUS/mods/ns3-src/src/buildings/model/hybrid-raylight-buildings-propagation-loss-model.cc & .h into the directory $NS3<sub>MAIN</sub><sub>PATH</sub>/src/buildings/model/
|
|
|
- Modify the text file NS3<sub>MAIN</sub><sub>PATH</sub>/src/buildings/wscript, as before, in order to include the new files.
|
|
|
|
|
|
6. install the start scratch (dont' ask why we didn't setup a proper application model, we'll do that later, with all bells and whistles):
|
|
|
- Copy the file CUSCUS/mods/ns3-src/scratch/uavConnectedSimBuildingRaylight.cc in the directory $NS3<sub>MAIN</sub><sub>PATH</sub>/scratch/
|
|
|
|
|
|
7. Re-compile ns-3 with waf
|
|
|
8. The ns-3 simulator <del>should be</del> is ready
|
|
|
|
|
|
|
|
|
<a id="orgf56de82"></a>
|
|
|
|
|
|
## Third Step - Install [FL-AIR](https://www.hds.utc.fr/heudiasyc/production/logiciels-970/logiciels-971/article/fl-air-framework-libre-air-3123?lang=fr) (following the FL-AIR site instructions)
|
|
|
|
|
|
Plase feel free to use the documentation for installation available [here](https://devel.hds.utc.fr/software/flair).
|
|
|
|
|
|
Just make sure that you also complete all the substeps in this section:
|
|
|
|
|
|
- set up the $FLAIR<sub>ROOT</sub> envoronment variable as described [here](https://devel.hds.utc.fr/software/flair/wiki/setup).
|
|
|
- install the [toolchains](https://devel.hds.utc.fr/software/flair/wiki/toolchain/install) (stick to the x86<sub>64</sub> one)
|
|
|
- Copy the interesting parts of `/root/.bashrc` to `/home/<username>/.bashrc`
|
|
|
- check the graphic card driver ([TODO](https://devel.hds.utc.fr/software/flair/wiki/toolchain/install))
|
|
|
- download the FL-AIR code ([Latest flair version](https://devel.hds.utc.fr/software/flair/wiki/repo/sync))
|
|
|
- STOP
|
|
|
- <del>compile all with the "flair<sub>compile</sub><sub>all.sh</sub>" script (NICOLA'S NOTES: non funge senza xenomai, passaggio da rivedere)</del>
|
|
|
- <del>(problema con la demo OpticalFlow)</del>
|
|
|
- If you like, amuse yourself with the instruction in this [link](https://devel.hds.utc.fr/software/flair/wiki/circlefollower)
|
|
|
- You can use the experience later, to check if you have compiled the programs correctly or not.
|
|
|
- Copy the entire directory CUSCUS/mods/CuscusBasic into $FLAIR<sub>ROOT</sub>/flair-src/demos
|
|
|
- <del>\*Compile the demos with the "flair<sub>compile</sub><sub>all.sh</sub>" script (NICOLA'S Notes: come sopra)</del>
|
|
|
- Follow the same instruction as [here](https://devel.hds.utc.fr/software/flair/wiki/circlefollower)
|
|
|
- **ONLY THE COMPILATION PART** (you don't have to execute anything now)
|
|
|
- It should be ok to run now.
|
|
|
|
|
|
|
|
|
<a id="orgc73873b"></a>
|
|
|
|
|
|
### Extra - Make sure that
|
|
|
|
|
|
- You have exported $FLAIR<sub>ROOT</sub> and $NS3<sub>MAIN</sub><sub>PATH</sub>
|
|
|
- Modify CUSCUS/mods/scripts/parametersCUSCUS.dat accordingly
|
|
|
|
|
|
|
|
|
<a id="org24d56b4"></a>
|
|
|
|
|
|
## Fourth Step
|
|
|
|
|
|
- run `CUSCUS/mods/scripts/launchCUSCUS.sh`
|
|
|
- you can use bash or chmod-it into execution (but you have to remember to use bash).
|
|
|
- It should work
|
|
|
- Look out for errors
|
|
|
|