Skip to content
malter edited this page Dec 8, 2022 · 23 revisions

Biologically inspired Graph-Based Language (Bagel)

NOTE: The process of uploading the Bagel packages is not finished yet. Thus, the links to some documented packages may still be unavailable.

Introduction

Bagel is a graph-based programming language, which allows to graphically design a control algorithm and optimize or evolve an algorithm by utilizing learning methods such as genetic algorithms. The general concept is shown in the following figure:

The Bagel project includes a collection of tools allowing to design, execute, test, and validate Bagel graphs. The graphs can be defined in yaml files, see Bagel-Format. The single components can either be build from source (see install from source) or be installed via a precompiled package (precompiled package).

Tools and Libraries

Bagel Magic Bagel-Magic

The BagelMagic GUI is a wizard to easily create a Bagel graph for a selected robot model and to configure the simulation to test the graph with the model in a selected simulation scenario (office, outdoor, etc.). In the default use-case the user starts BagelMagic to design and test Bagel graphs.

Bagel GUI Bagel-GUI

BagelGui is an application to graphically visualize and edit Bagel graphs.

c_bagel c_bagel

The c_bagel is a pure C implementation to load, execute, and save Bagel graphs.

cpp_bagel_wrapper (link)

This library provides a comfortable interface to load and execute Bagel graphs from within C++ projects.

bagel_db bagel_db

A file system-based database to manage Bagel graphs.

bagel_unit_testing (link)

A small program that can be used to define desired input-output mapping of Bagel graphs and test them.

xrock_bagel_tools (link)

Command line tools to organize Bagel graphs of bagel_db.

Bagel MARS (link)

An interface to the 3D-simulation tool MARS.
The Bagel graphs can be executed in the simulation tool to test, plot, and export their output even if no robot is used. A robot model can be generated with Phobos.

Install from Source

Install dependencies for Ubuntu:

Ubuntu 18.04:

sudo apt install python-yaml git python-qt4

Ubuntu 20.04:

sudo apt install python-is-python3 python3-yaml git python3-pyqt5

If you have a minimal installation of Ubuntu you also have to install a c++ compiler:

sudo apt install g++ make

The following bootstrap script will use PyBob to install the Bagel components:

wget https://raw.githubusercontent.com/dfki-ric/bagel_wiki/master/bootstrap_magic.sh
bash bootstrap_magic.sh

Note: Run the script with bash bootstrap_magic.sh.

To start Bagel Magic type:

  cd bob-magic-dev
  source env.sh
  cd bagel/bagel_magic
  python gui.py

Tutorials