This code accompanies the 2023 Robotics Automation Letters (RA-L) paper. It was also presented at ICRA 2023 (Oral).
Project page: https://aalpatya.github.io/gbpplanner
Watch the Code tutorial: https://www.youtube.com/watch?v=jvoPJ8GLiHk
Install Raylib dependencies as mentioned in https://github.com/raysan5/raylib#build-and-installation. This will be platform dependent. For raylib itself, the CMakeLists.txt file should automatically find the library if it is already installed on your system, else, it will try and fetch it using FetchContent.
Usually included with Linux (but you may need to install on other platforms)
- OpenMP
- cmake (>=3.11)
- make
I found that adding the following to ~/.zshrc worked:
export PATH="/opt/homebrew/opt/llvm/bin:$PATH"
export OpenMP_ROOT=$(brew --prefix)/opt/libomp
export LDFLAGS="$LDFLAGS -L${OpenMP_ROOT}/lib"and then run:
brew install llvm
brew install libomp
brew link --force libompClone the repository with the submodule dependencies:
git clone https://github.com/aalpatya/gbpplanner.git
cd gbpplannerUse CMAKE to set up the build environment and then run 'make':
mkdir build
cd build
cmake ..
makeMake any changes to the simulations you want in config/config.json and then run:
./gbpplannerExamples config files are in config directory, and include:
config.json(default: robots travel to the opposite sides of a circle in free space)circle_cluttered.json(robots travel to the opposite sides of a circle around some obstacles)junction.json(robots travel in a crossroad junction)junction_twoway.json(robots can travel in both directions, in any road and can turn left, straight, right (red, green, blue) respectively)
Run the simulation:
./gbpplanner --cfg ../config/circle_cluttered.jsonOr create your own config_file.json and run:
./gbpplanner --cfg ../config_file.jsonPress 'H' to display help and tips!
Use the mouse wheel to change the camera view (scroll : zoom, drag : pan, shift+drag : rotate)
Press 'spacebar' to transition between camera keyframes which were set in src/Graphics.cpp.
Edit the parameters in the config files and see the effects on the simulations!
Watch the Code tutorial: https://www.youtube.com/watch?v=jvoPJ8GLiHk
You may want to create your own formations and scenarios for the robots.
Towards the end of src/Simulator.cpp there is a function called createOrDeleteRobots(), where you may add your own case.
- Create an image file (.png) with BLACK obstacles on a WHITE background (see
assets/imgsfor examples) - Covert your image to a distance field image using the function in
assets/scripts/create_distance_field.py - Edit the OBSTACLE_FILE value in your config.json file with the new distance image
@ARTICLE{gbpplanner,
author={Patwardhan, Aalok and Murai, Riku and Davison, Andrew J.},
journal={IEEE Robotics and Automation Letters},
title={Distributing Collaborative Multi-Robot Planning With Gaussian Belief Propagation},
year={2023},
volume={8},
number={2},
pages={552-559},
doi={10.1109/LRA.2022.3227858}}

