This work describes a Fast Obstacles Avoidance (FOA) which can be used, when the known input data is sampled (unstructured), or in the presence of many obstacles. The algorithm is able to input sampled data, as well as a desired velocity, and outputs the collision-free velocity.
Since the input to the algorithm is raw sensor data (in the cartesian frame), it can directly be applied to an arbitrary number of data points.
Improved performance can be achieved by first clustering the data points with commonly used techniques, here we use DBSCAN.
A video describing the algorithm in depth can be found under:
The algorithm has several free parameters which can be tuned to adapt the performance based on the environment.
The distance for each data point
where
Crucial for the function of the algorithm is the influence weight that each point
An example script that analyses the different parameters can be found in ./examples/example_parameter_comparison.py
A larger control radius
|
|
|
Attribute name: control_radius
The weight factor is a simple scaling on the weight. An increased value results in an increased avoidance effect (higher modulation) further away from the obstacle. This results in safer avoidance, but with lower similarity to the original trajectory.
|
|
|
where
Attribute name: weight_factor
The weight power increases weights above one but decreases weights below zero. Note, that most weights have a value below one. Hence, with an increased scaling value, the effect on the surroundings is lower. However, when getting close to the obstacle this effect is inverted (as we get weights larger than one).
|
|
|
Attribute name: weight_power
To set it, go to your install/code directory, and type:
git clone --recurse-submodules https://github.com/hubernikus/fast_obstacle_avoidance.git
(Make sure submodules are there if various_tools library is not installed.)
Go to the file directory:
cd fast_obstacle_avoidance
Setup your environment, with Python>3.7 (here Python 3.9): Choose your favorite python environment. I recommend using virtual environment venv. Set up the virtual environment (use whatever compatible environment manager that you have with python -V >= 3.10).
python3.10 -m venv .venv
Activate your environment
source .venv/bin/activate
Install all requirements:
pip install -r requirements.txt && python setup.py develop
This package depends on two libraries: Dynamic obstacle avoidance https://github.com/hubernikus/dynamic_obstacle_avoidance.git
Various Tools https://github.com/hubernikus/various_tools.git
Make sure you have these installed, otherwise, this can be done by:
mkdir src && cd src
git clone https://github.com/hubernikus/dynamic_obstacle_avoidance.git && cd dynamic_obstacle_avoidance
pip install -r requirements.txt && python setup.py develop && cd ..
git clone https://github.com/hubernikus/various_tools.git && cd various_tools
pip install -r requirements.txt && python setup.py develop && cd ../..
To get started, try to run the files in the 'examples' folder.
Install ROS-bag evaluation.
pip install -r requirements_ros.txt
pip install rosbag --extra-index-url https://rospypi.github.io/simple/
Various Tools [Algebra & Dynamical Systems], https://github.com/hubernikus/various_tools
Install the dev-requirements
pip install -r requirements_dev.txt
Try to use pre-commit-hooks if actively contributing to the repository:
pre-commit install
You forgot to add the submodules, add them with:
git submodule update --init --recursive
- The current repository does not have any test for CI/CD. This will be added if desired for future uses.
- The clustering is based on DBSCAN (which has a simple hyperparameter choice), however, it does not scale well with the number of dimensions or the number of datapoints. Faster approaches should be adapted to be useful for the current method.
You forgot to add the submodules, add them with:
git submodule update --init --recursive
If you use this repository in a scientific publication, please use the 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