Master Thesis Project in Computer Engineering at Aarhus University 2024 on "Simulating Multi-agent Path Planning in Complex environments using Gaussian Belief Propagation and Global Path Finding". Available here (https://drive.google.com/file/d/12g-7bqcy_yfkZdpKzxQAErayFJQhu4sE/view?usp=sharing)
waypoint.webm
path.webm
The video below demonstrates some of the features of the simulation tool, and shows how the GBP algorithm can handle complex scenarios such as a multi-lane twoway junction.
magics-functionality-demo-trimmed-for-github.webm
The accompanying thesis is available online here.
All development has been done on Linux, but both Windows and MacOS is supported as well. The compilation instructions are the same for all platforms.
- Rust toolchain
stable
channel - Cargo build system
- External dependencies for graphics (see External Dependencies)
- Clone the repository
- Install the required dependencies for your platform
Key | Function |
---|---|
H | Toggle Left Panel |
L | Toggle Right Panel |
K | Toggle Top Panel |
J | Toggle Bottom Panel |
D | Toggle Metrics Window |
U | Change Scale Kind |
Key/Mouse | Function |
---|---|
Arrow Keys | Move Camera |
C | Toggle Camera Movement Mode (Pan/Orbit) |
Tab | Switch Camera |
R | Reset Camera |
Mouse Wheel | Zoom In/Out |
Left Mouse Button + Mouse Movement | Move Camera (Pan or Orbit depending on mode) |
Middle Mouse Button | Pan Camera |
Right-click Drag | Rotate Camera |
Key | Function |
---|---|
F5 | Reload Current Simulation |
F6 | Load Next Simulation |
F4 | Load Previous Simulation |
Space | Pause/Play Simulation |
Key | Function |
---|---|
T | Cycle Theme |
G | Export Graph |
Ctrl+S | Save Settings |
Ctrl+P | Take Screenshot |
Ctrl+Q | Quit Application |
Most dependencies used are available through the crates.io registry. And should work on all major platforms supported by the cargo
build tool. Still some external dependencies are needed for the graphical session.
Dependencies | Platform Specific |
---|---|
alsa-lib |
Linux |
egl-wayland |
Linux + Wayland |
fontconfig |
Linux |
freetype |
Linux |
libxkbcommon |
Linux + X11 |
udev |
Linux |
vulkan-loader |
Linux |
wayland |
Linux + Wayland |
xorg.libX11 |
Linux + X11 |
xorg.libXcursor |
Linux + X11 |
xorg.libXi |
Linux + X11 |
xorg.libXrandr |
Linux + X11 |
The exact name of the dependency might vary between platforms, and even between Linux distributions. Consult the respective package management tool used on your system for their exact names.
The ./flake.nix
file provides a development shell with all the necessary dependencies to run the project. If you have direnv
installed you can simply use the provided .envrc
and type direnv allow
to automatically enter it. Otherwise you can run:
# To enter the development environment
nix develop
The entire project can be build with the following command:
cargo build --release
The simulator comes with several pre-configured scenarios to demonstrate different aspects of multi-agent path planning:
Circle Experiment
: Robots arranged in a circle swap positionsJunction Experiment
: Robots navigate through a four-way junctionStructured Junction
: A more complex junction with structured pathsCollaborative Complex
: Multiple robots collaborating in a complex environment- And many more...
Use the --list-scenarios
command to see all available scenarios.
Important: When specifying a scenario, use the exact name as shown in the
--list-scenarios
output. Do not use file paths.
When running in Windows Subsystem for Linux (WSL), you need to configure an X server:
- Install an X server on Windows (VcXsrv, Xming, or X410)
- Launch the X server with "Disable access control" checked
- Set the following environment variables in WSL:
export DISPLAY=:0
export WINIT_UNIX_BACKEND=x11
# Open the simulator with the first
cargo run --release
cargo run --release -- --list-scenarios # List all available scenarios
# Run a specific scenario
cargo run --release -- -i <SCENARIO_NAME>
# See ./config/scenarios/ for all distributed scenarios
cargo run --release -- -i "Junction Twoway"
- Problem: "Failed to build event loop: Os(OsError { ... error: WaylandError(Connection(NoCompositor)) })"
- Solution: Set
export DISPLAY=:0
andexport WINIT_UNIX_BACKEND=x11
and inCargo.toml
underbevy
removewayland
:
bevy = { version = "0.13", default-features = true, features = [
- "wayland",
] }
- Problem:
cannot find 'ld'
, - Solution: You will have to go into .cargo/config.toml and disable the use of
mold
:
[target.x86_64-unknown-linux-gnu]
rustflags = [
- "-Clink-arg=-fuse-ld=mold", # Use mold Linker
"-Ctarget-cpu=native",
]
The primary algorithm for GBP path planning is based on gbpplanner by Aalok Patwardhan from Imperial College London and Dyson Robotics Lab. As part of this thesis we have reimplemented and extended upon in Rust!
@misc{jensen2025multiagentpathplanningcomplex,
title={Multi-Agent Path Planning in Complex Environments using Gaussian Belief Propagation with Global Path Finding},
author={Jens Høigaard Jensen and Kristoffer Plagborg Bak Sørensen and Jonas le Fevre Sejersen and Andriy Sarabakha},
year={2025},
eprint={2502.20369},
archivePrefix={arXiv},
primaryClass={cs.RO},
url={https://arxiv.org/abs/2502.20369},
}