/dynamic_obstacle_avoidance

Closed-Form Algorithm for Dynamic Obstacle Avoidance

Primary LanguagePythonThe UnlicenseUnlicense

ObstacleAvoidance Algorithm


License: Unlicense Code style: black

This package contains a dynamic obstacle avoidance algorithm for concave and convex obstacles as developped in [1] and [2]. The Code is still in alpha version.

Requirements: python

Description

The algorithms allows to avoid dynamic, star-shaped obstacles. It requires anlytical description of the environment. It allows to navigate within moving, expanding and static obstacles.

Setup

To setup got to your install/code directory, and type:

git clone --recurse-submodules https://github.com/epfl-lasa/dynamic_obstacle_avoidance.git

(Make sure submodules are there if various_tools library is not installed. To initialize submodules after cloning use git submodule update --init --recursive. To update all submodules git submodule update --recursive

Go to file directory:

cd dynamic_obstacle_avoidance

Custom Environment

Choose your favorite python-environment. I recommend to use virtual environment venv. Setup virtual environment (use whatever compatible environment manager that you have with Python >=3.9).

python3.10 -m venv .venv

with python -V >= 3.9

Activate your environment

source .venv/bin/activate

Setup Dependencies

Install all requirements:

pip install -r requirements.txt && pip install -e .

make sure you also install the submodules (mainly vartools)

Install the sub modules:

cd libraries/various_tools && pip install -r requirements.txt && pip install -e . && cd ../..

Installation Options

If you want to be able to test/develop additionally install

pip install -r requirements_dev.txt

For the use of the jupyter notebook additionally install (found in the examples/notebook folder)

pip install -r requirements_notebook.txt

Getting Started

The example folder contains a jupyter notebook & general example for static & dynamic simulation in multi-obstacle environment.

More information about the behavior of the algorithm can be found in the video below (click on the image to watch it): Alt text

For Developers

We use pytest in this, to test the code run

pytest

Code consistency is ensured by using black. Download and setup pre-commit hook for automated formatting

pip install pre-commit

3D Plotting

In order to get nice 3D plots, additionally install mayavi (http://docs.enthought.com/mayavi/mayavi/index.html) & PyQt5

pip install mayavi
pip install PyQt5

Debug

You forgot to add the submodules, add them with:

git submodule update --init --recursive

Citing Repository

If you use this repository in a scientific publication, please use following citation:

Huber, Lukas. Exact Obstacle Avoidance for Robots in Complex and Dynamic Environments Using Local Modulation. No. 10373., EPFL, 2024.

Bibtex entry:

@phdthesis{huber2024exact,
  title={Exact Obstacle Avoidance for Robots in Complex and Dynamic Environments Using Local Modulation},
  author={Huber, Lukas},
  year={2024},
  month={April},
  address={Lausanne, Switzerland},
  school={EPFL},
  type={PhD thesis}
}

(c) hubernikus