Robotic Behavior in RobMoSys using Behavior Trees and the SmartMDSD Toolchain (MOOD2be ITP)

This demonstration shows task-level composition (robotic behavior) in RobMoSys using behavior trees.


MOOD2Be provides two pieces of softwares:

  • BehaviorTree.CPP: a C++ framework and toolset to create, execute and debug Behavior Trees.
  • Groot: a graphical IDE to create, edit, monitor and analyze Behavior Trees.

BehaviorTree.CPP allows the creation of a Executor where the actual behavior trees are executed, whilst Groot is a graphical tool to help the Behavior Design to be more productive. The demonstration focuses on the integration of the SmartMDSD Toolchain, an Integrated Development Environment (IDE) for robotics software development conform-to RobMoSys, with Groot, a graphical user interface to edit behavior trees. The development of the behavior tree is based on the skills provided by a system that was modeled using the SmartMDSD Toolchain.

Demonstration: building task-level coordinators using Behavior Trees

In the following video we can see the workflow from the perspective of the Behavior Developer:

  1. A list of available Skills is provided to the Behavior Developer in the form of a file containing the model of the skills. These Skills are part of the Digital Datasheet of a system.
  2. The Behavior Developer loads this file into Groot and use the generated “palette” of Actions to design a behavior tree; the outcome of this process is also a file, containing the model of the tree.
  3. A specific application (an “Executor” created using BehaviorTree.CPP) loads both these files to create and execute the behavior tree.
  4. The Executor communicates through a the rest of the system using a Skill Server, which provides access to the components skills.

This process doesn’t require any code-generation nor compilation, since both the nodes and the trees are create programmatically at run-time. This workflow is shown in the following video.

Demonstration is in the Context of RobMoSys User-Stories

In the context of the RobMoSys technical user stories, this demonstration shows:

  • Reusability: Actions, Conditions and Skills, which corresponds to Nodes of a behavior tree, are highly reusable piece of software that are application independent. Furthermore, SubTrees can also be reusable as parts of more complex Trees.
  • Easy to use: Groot is more than a simple GUI. It is an IDE for behavior trees, which supports editing, logs analysis and real-time debugging. Both software and documentation are meant to provide a fast learning curve and high productivity.
  • Composable components: trees are hierarchical and composable. Simple behaviors can be composed into complex ones.
  • Standardization of models and interfaces: the skill interfaces are defined as part of RobMoSys Tier 2 Domain Models. These are general descriptions of skills and can be mapped to a specific software components (Tier 3) providing these skills (such as the robotino base robot provides the “move-to” skill).

Technical Details

Based on an existing robotics application developed with the SmartMDSD Toolchain and the Skills that are provided by the application’s components, the Behavior Developer selects and composes actions and conditions to develop the behavior tree.

The behavior tree is used to do task-level coordination and its actions execute RobMoSys skills. These skills (e.g. MoveBaseToGoal) use the RobMoSys software component coordination interface to directly coordinate the components e.g. setting component configurations.

In the next diagram we can see how the different RobMoSys roles interact:

  1. The Domain Expert defines a set of domain specific Skill Definitions.
  2. These definitions are implemented as Skill Realizations by the Component Developer.
  3. The System Builder composes multiple components; as a result, a particular software system provides a set of Skills in the Digital Datasheet.
  4. The Behavior Designer uses this skills to create a Behavior Tree; the model of the tree can be directly executed.

The picture below illustrates this workflow. Note how the different roles are supported by different tools in the RobMoSys ecosystem: Domain Expert, Component Supplier and System Builder are supported by the SmartMDSD Toolchain. The Behavior Developer is supported by Groot/BehaviorTree.CPP.

The below screenshot shows Groot in action while editing a behavior tree:

Previous demonstration (June 2018)

A previous version of this demonstration as of June 27 2018 focused on the technical feasibility of behavior trees communicating with components from the SmartMDSD Toolchain. At that time, it was manual effort by the system builder to “connect” the behavior engine with software components. This manual effort is now replaced by a full model-driven workflow and interaction between component supplier, system builder and behavior developer roles.

In the below video, the execution of the behavior tree is first shown in simulation using the “Gazebo/Tiago/SmartSoft Scenario” as provided by RobMoSys. The behavior tree is then executed on a FESTO Robotino Robot as part of the RobMoSys “Intralogistics Industry 4.0” Pilot. Finally, the video demonstrates the visualization of an automatically generate log file, that allow the user to analyze the execution of the behavior tree offline.

Skill Modeling by the SmartMDSD Toolchain

Skills are modeled by the Domain Expert role on Tier 2. The below screenshot shows the skill definition model in a Domain Model Project.

Skills are realized by software components. The below screenshot shows the skill realization as it is created by the Component Supplier role in a component project (Tier 3).

System Component Architecture

The figure included below shows a screenshot of the system component architecture diagram of the demonstration. It was modeled using the SmartMDSD Toolchain. The system was composed by the system builder from previously developed software components.

The modeled system comes with a digital data sheet (see project explorer on lower left). It lists the skills which come with the components of the system. This datasheet can be imported to Groot for use by the Behavior Developer.

Current State and Roadmap

Both BehaviorTree.CPP and Groot are currently “feature complete”. These softwares include extensive documentation and unit tests; they have a good level of maturity and can be already used in real-world applications. In terms of community and dissemination, the code is available on Github and has an increasing number of users, which started contributing with bug reports, bug fixes and feature requests.

The additional goals for the rest of the MOOD2Be project (running till Feb. 2019)are:

  • Further improve tutorials and documentation, particularly in the context of the SmartMDSD Toolchain.
  • Increase the reliability of the software.
  • Further promote the tool in the robotic community.
  • Include new features proposed by the users, for instance the ability to include XML files into each other (similarly to header files in C++).

Support of the behavior developer by the SmartMDSD Toolchain is ongoing work and available as a prototype which is expected for release soon:

  • Modeling of skill definitions for Domain Models / Tier 2: Domain Expert
  • Realization of skills in software components / Tier 3: Component Supplier / Behavior Developer
  • Digital data sheet of a system containing a “available skills” section: System Builder and Behavior Developer



This technical demonstration has been realized by the MOOD2Be project and the Ulm University of Applied Sciences. The behavior tree engine and the GUI are being developed by the MOOD2be ITP. The SmartMDSD Toolchain and the intralogistics use-case/pilot application are being developed by the Ulm University of Applied Sciences.

MOOD2be is an Integrated Technical Project (ITP) of EU H2020 RobMoSys ( Ulm University of Applied Sciences is a RobMoSys core partner.

This activity has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No 732410.

See also

community:behavior-tree-demo:start · Last modified: 2019/05/20 10:49