Skip to the content.

Arbitration Graphs

Latest Release License Unit Test Status

TL;DR: Replace those rusty state machines with safe and scalable arbitration graphs!

Hierarchical behavior models for complex decision-making and behavior generation in robotics!

Demo

We provide a demo of this library using Pac-Man as an example application.
The arbitration graph controls Pac-Man on its journey to collect tasty dots šŸ¬

Run the demo with:

git clone https://github.com/KIT-MRT/arbitration_graphs.git
cd arbitration_graphs/demo
docker compose up

Open the GUI with your favorite browser:
http://0.0.0.0:8080

Explanation

You will see the Pacman Agent arbitrator selecting between five behavior options (by priority).
The Eat Dots option is itself an arbitrator with two sub-behaviors (selecting by expected benefit).

In this scene,

Tutorial

Follow our Tutorial and learn how to use the Arbitration Graphs library!
Itā€™s based on this demo and guides you through all important concepts:

  1. Introduction ā€“ start here!
  2. Implement your first behavior component
  3. Extend the arbitration graph with that behavior
  4. Learn about nested arbitration graphs
  5. Arbitrate based on predicted utility
  6. Verify commands and add a fallback strategy

Installation

The arbitration_graphs library consists of two parts

Prerequisites

First make sure all dependencies are installed:

See also the Dockerfile for how to install these packages under Debian or Ubuntu.

Installation using Debian package (recommended)

We provide a Debian package for easy installation on Debian-based distributions. Download the latest .deb packages for the core library and optionally for the gui install them with dpkg:

sudo dpkg -i libarbitration-graphs-core-dev.deb
sudo dpkg -i libarbitration-graphs-gui-dev.deb
Installation from .zip/.tar.gz

As this is a header-only library, no platform-specific compilation is needed. So, you can also install the files directly from our release .zip or .tar.gz archives:

tar xf arbitration_graphs-core.tar.gz --directory=/
tar xf arbitration_graphs-gui.tar.gz --directory=/

This installs into /usr/[include,lib,share]/arbitration_graphs. Please read Serving the WebApp GUI below, if you consider custom installation paths and want to use the GUI.

Using Docker image with pre-installed library

We provide a Docker image with the library and all dependencies already installed globally.

docker pull ghcr.io/kit-mrt/arbitration_graphs

The library is located under /usr/local/include/arbitration_graphs/ and /usr/local/lib/cmake/arbitration_graphs/. So, it can be easily loaded with CMake:

find_package(arbitration_graphs REQUIRED)
Building from source using CMake

Clone the repository:

git clone https://github.com/KIT-MRT/arbitration_graphs.git
cd arbitration_graphs

Compile and install the project with CMake:

mkdir -p arbitration_graphs/build
cd arbitration_graphs/build
cmake ..
cmake --build .
sudo cmake --install .

In order to skip compiling the GUI, use cmake -DBUILD_GUI=false .. instead.

Development

Using Docker image

Clone the repository and run the development image

git clone https://github.com/KIT-MRT/arbitration_graphs.git
cd arbitration_graphs
docker compose build
docker compose run --rm arbitration_graphs_devel

This mounts the source into the containerā€™s /home/blinky/arbitration_graphs folder. There, you can edit the source code, compile and run the tests etc.

Compiling unit tests

In order to compile with tests define BUILD_TESTS=true

mkdir -p arbitration_graphs/build
cd arbitration_graphs/build
cmake -DBUILD_TESTS=true ..
cmake --build . -j9

Run all unit tests with CTest:

cmake --build . --target test
Serving the WebApp GUI

The GUI consists of

  • a web server with static WebApp files, see gui/app
  • a websocket server providing the arbitration graph state to the WebApp

In order to serve the WebApp files, their location must be known to the executable running the web server. By default (and without further setup), we support these locations:

  • the install path, i.e. /opt/share/arbitration_graphs
  • the current source path for local builds, i.e. /home/blinky/arbitration_graphs/gui/app/arbitration_graphs (only works, if no installation has been found)

If you intend to override these, please use the APP_DIRECTORY environment variable to define the WebApp path:

APP_DIRECTORY=/my/custom/app/path my_awesome_executable

Contributors

This library and repo has been crafted with ā¤ļø by

Christoph Burger Ā  ChristophBurger89 Ā  LinkedIn logo christoph-burger Ā  ORCID iD 0009-0002-9147-8749
Nick Le Large Ā  ll-nick Ā  LinkedIn logo nick-le-large Ā  ORCID iD 0009-0006-5191-9043
Piotr Spieker Ā  orzechow Ā  LinkedIn logo piotr-spieker Ā  ORCID iD 0000-0002-0449-3741

Christoph and Piotr coded the core in a pair-programming session. Piotr also contributed the GUI and GitHub Page. Nick implemented the awesome PacMan demo and tutorial, with drafting support by Christoph, reviews and finetuning by Piotr.

The repository is maintained by Piotr SpiekerĀ  orzechow and Nick Le LargeĀ  ll-nick .

Citation

If you use arbitration graphs in your research, we would be pleased if you cite our work:

Piotr Spieker, Nick Le Large, and Martin Lauer, ā€œBetter Safe Than Sorry: Enhancing Arbitration Graphs for Safe and Robust Autonomous Decision-Making,ā€ Nov. 15, 2024, arXiv: arXiv:2411.10170. doi: 10.48550/arXiv.2411.10170.

@misc{spieker2024ArbitrationGraphs,
  title={Better Safe Than Sorry: Enhancing Arbitration Graphs for Safe and Robust Autonomous Decision-Making}, 
  author={Piotr Spieker and Nick Le Large and Martin Lauer},
  year={2024},
  eprint={2411.10170},
  eprinttype = {arXiv},
  archivePrefix={arXiv},
  primaryClass={cs.RO},
  doi = {10.48550/arXiv.2411.10170},
  url={https://arxiv.org/abs/2411.10170}, 
}
Earlier publications

Behavior Verification and Fallback Layers

A safety concept that extends Arbitration Graphs with behavior verification and fallback layers in the context of automated driving has been proposed by Piotr Spieker (nƩe Orzechowski) in his PhD thesis. This served as the basis for the paper with Nick above.

Piotr F. Orzechowski, ā€œVerhaltensentscheidung fĆ¼r automatisierte Fahrzeuge mittels Arbitrationsgraphen,ā€ phd, Karlsruher Institut fĆ¼r Technologie (KIT), 2023. doi: 10.5445/IR/1000160638.

@thesis{Orzechowski2023Arbitrationsgraphen,
  type = {phdthesis},
  title = {Verhaltensentscheidung fĆ¼r automatisierte Fahrzeuge mittels Arbitrationsgraphen},
  author = {Orzechowski, Piotr Franciszek},
  date = {2023},
  institution = {Karlsruher Institut fĆ¼r Technologie (KIT)},
  doi = {10.5445/IR/1000160638},
  langid = {german},
  pagetotal = {169},
}

Replacing state machines in AV

Arbitration Graphs replaced state machines in the context of automated driving at the Institute of Measurement and Control Systems (MRT) of the Karlsruhe Institute of Technology (KIT):

Piotr F. Orzechowski, Christoph Burger, and Martin Lauer, ā€œDecision-Making for Automated Vehicles Using a Hierarchical Behavior-Based Arbitration Scheme,ā€ in Intelligent Vehicles Symposium, Las Vegas, NV, USA: IEEE, Oct. 2020, pp. 767ā€“774. doi: 10.1109/IV47402.2020.9304723.

@inproceedings{orzechowski2020ArbitrationGraphs,
  title = {Decision-Making for Automated Vehicles Using a Hierarchical Behavior-Based Arbitration Scheme},
  booktitle = {Intelligent Vehicles Symposium},
  author = {Orzechowski, Piotr F. and Burger, Christoph and Lauer, Martin},
  date = {2020-10},
  pages = {767--774},
  publisher = {IEEE},
  location = {Las Vegas, NV, USA},
  issn = {2642-7214},
  doi = {10.1109/IV47402.2020.9304723},
}

Foundation work in Robot Soccer

The foundations for Arbitration Graphs have been proposed in the context of robot soccer:

Martin Lauer, Roland Hafner, Sascha Lange, and Martin Riedmiller, ā€œCognitive concepts in autonomous soccer playing robots,ā€ Cognitive Systems Research, vol. 11, no. 3, pp. 287ā€“309, 2010, doi: 10.1016/j.cogsys.2009.12.003.

@article{lauer2010CognitiveConceptsAutonomous,
  title = {Cognitive Concepts in Autonomous Soccer Playing Robots},
  author = {Lauer, Martin and Hafner, Roland and Lange, Sascha and Riedmiller, Martin},
  date = {2010},
  journaltitle = {Cognitive Systems Research},
  volume = {11},
  number = {3},
  pages = {287--309},
  doi = {10.1016/j.cogsys.2009.12.003},
}