Skip to content

Repository files navigation

AirmobiSim Project

Pre-Installation

AirMobiSim can be used standalone (pure Python kinematic simulation) or coupled with OMNeT++/veins for wireless communication simulation. The OMNeT++ coupling is optional.

For the standalone simulator, you only need:

  • curl
  • pyenv
  • poetry

If you also want the OMNeT++/veins coupling, you additionally need:

  • OMNeT++ 6
  • conan

OMNeT 6 installation (only needed for the OMNeT++ coupling)

Please do follow the instructions from the official OMNeT documentation

Conan installation (only needed for the OMNeT++ coupling)

Please do follow the instructions from the official conan documentation

Curl installation

To install curl please do execute:

Linux/Debian sudo apt install curl

MacOS brew install curl

Poetry installation

Please do follow the instructions from the official poetry documentation, e.g.:

curl -sSL https://install.python-poetry.org | python3 -

This installs poetry to ~/.local/bin, which most Linux distributions (Debian/Ubuntu included) already add to PATH automatically for login shells - open a new shell (or re-source your .bashrc/.zshrc) after installing so poetry is picked up before running build.sh.

Note: on a headless Linux server (no desktop session / D-Bus), poetry install can hang indefinitely while trying to look up credentials via the keyring library. build.sh already sets PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring to avoid this; if you run poetry commands manually outside of build.sh and they seem to hang, export the same variable first.

Note: if you already had a working environment from before a dependency was removed from pyproject.toml, plain poetry install will not remove the now-unneeded package from your existing virtualenv (it only adds what's missing). Use poetry install --sync instead to also remove packages that are no longer listed.


AirMobiSim-Installation

All required dependencies are locally installed using pyenv and poetry by executing the build.sh script:

./build.sh

This installs the standalone Python simulator only (no OMNeT++/conan required).

To also set up the OMNeT++/veins coupling (clones and compiles veins and AirMobiSim_libveins; requires OMNeT++ and conan to be installed), run instead:

./build.sh --with-omnet

Without -y/--non-interactive, the script will also ask interactively whether to set up the OMNeT++ coupling. Conan's state (profiles, package cache) is kept scoped to the project directory (.conan_home/) rather than touching your global ~/.conan2.

Note: if you have OMNeT++'s own setenv script sourced in your shell (needed to get opp_run etc. on PATH), it may also put OMNeT++'s bundled Python distribution ahead in PATH and export PYTHONHOME/PYTHONPATH. build.sh clears these for its own run, but if you run poetry install or poetry run ./airmobisim.py manually afterwards in a shell where OMNeT++'s setenv is sourced, unset them first:

unset PYTHONHOME PYTHONPATH

Otherwise poetry/pyenv may end up targeting OMNeT++'s bundled Python instead of this project's own environment, which can silently break either one.


Run AirmobiSim

To run the project use the following command in 'poetry shell':

poetry run ./airmobisim.py

The above command will run the simulation in command line without any plot.

To run the simulation with plot use :

poetry run ./airmobisim.py  --plot 1

To get a list of options to use with AirMobiSim, use:

poetry run ./airmobisim.py  -h

Configure a simulation

The input parameters for the simulations are taken from a file named simulation.config. An example is located in the examples directory.

Logging

A logfile is written to the project directory (e.g., AirMobiSim/examples/simpleSimulation). The loglevel can be set in the according configuration file.

About

AirMobiSim The open-source unmanned aerial vehicle simulation framework

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages