FZI Forschungszentrum Informatik

ros_bt_py
Behavior Tree Framework for
Robot Missions and Capabilities
David Oberacker
Oberacker@fzi.deMotivation
Creating High Level Missions for Your Robot
Various State Machine options are available‒ i.E SMACH, FlexBE, RAFCON..
‒ Well tested, understood & mature tooling available
BUT:‒ Tedious to use in larger Projects‒ Difficult to change and modify on the fly

Behavior Trees as the new standard‒ Easy to create and understand‒ Task oriented instead of states‒ Reactive and easy to modify & integrate

2FZI Forschungszentrum Informatik

17.12.23

Motivation
What we need from Behavior Trees
Current Behavior Tree Frameworks are

What do we want from a Behavior Tree Framework?

‒ less mature and provide fewer features than HSM‒ Easy to use offline and online‒ often focussed in their application or project‒ Modular, Flexible and Multi-Robot Enabled‒ still diffcult to use‒ Rapid mission building for various robots and applications‒ ROS Integration is often an afterthought‒ ROS Integration at every StepROS_BT_PY

Behavior Trees - Terminology?
→Control Flow
Condition
Have Ball?

4Action
Detect BallFZI Forschungszentrum Informatik

Pick Up Ball

17.12.23

Behavior Trees - Execution & Ticking?
→Have Ball?

5

Detect BallFZI Forschungszentrum Informatik

Pick Up Ball

17.12.23

ros_bt_py - Library

Python-based Implementation

Web-based Editor

Open-Source *Native ROS 1/2 Integration* https://github.com/fzi-forschungszentrum-informatik/ros_bt_py
6

FZI Forschungszentrum Informatik

17.12.23

Features
Behavior Tree-Perspective

Reactive
Behavior
Definiton

Long Running
AsynchronousTasks

Parametrization

Subtrees

Data Graph

UtilityCalculation

Remote Subtree
Execution

Capability
BasedCooperation

BehaviorTree.CPP

7

FZI Forschungszentrum Informatik

17.12.23

Features
Developer-Perspective

8

Python-based Nodes

Live Web-Editor

Hot-Reload of Nodes

ROS Message Autocompletion“Remote”-Development

ROS-based Control Interface

FZI Forschungszentrum Informatik

17.12.23

Comparison to BehaviorTree.CPP
ros_bt_py
Typeing✔

✔

Asynchronous Execution✔

✔

Data Graph✔

❌

Black Board❌

✔

Execution Logging and Debugging(✔)✔

Remote Development✔

❌

Node Hot-Reloading✔

❌

ROS Integration✔

✔

Dynamically Dispached
Capabilities✔

❌

Development Philosophy

9

BehaviorTree.Cpp• “Online Development”• (Almost) No Code• Quick Prototyping
FZI Forschungszentrum Informatik• “Offline Development”• Compiled Node-Library• Fast Runtime Performance
17.12.23

Let’s build a BT with ros_bt_py!

‒ (Simulated) Husky RobotScenario‒ Running Navigation Stack‒ Objects that need to be grasped‒ Load object poses from fileRequirements‒ Move Husky to the poses‒ Grasp the object at each pose10

FZI Forschungszentrum Informatik

17.12.23

Goals YAML Filepackage://ros_bt_py_sim/config/goals.yaml-{header: {frame_id: map},
pose: {
position: {x: 6.978711128234863,
y: 1.7688500881195068,
z: 0},
orientation: {
x: 0,
y: 0,
z: 0.8030835388209147,
w: 0.5958664528859436}}}-{
header: {….

11

FZI Forschungszentrum Informatik

17.12.23

Web-Editor Overview

12

FZI Forschungszentrum Informatik

17.12.23

ROS-Messages Integration

13

FZI Forschungszentrum Informatik

17.12.23

Capability-based Dynamic Dispatch14

FZI Forschungszentrum Informatik

17.12.23

Running the Behavior Tree15

FZI Forschungszentrum Informatik

17.12.23

Defining a new Node16

FZI Forschungszentrum Informatik

17.12.23

Evaluation
Projects

ESA Space Resources
Challenge
17

intelliRisk 2
FZI Forschungszentrum Informatik

17.12.23

Future Improvements‒ ROS2 Open Source Release‒ Feature Equality between ROS1 and ROS2

‒ Redesigned Web-Editor‒ Capability Editor‒ Robot-Team Capability Overview‒ Improved Debugging and Logging Facilities‒ Improved Multi-Robot Capability Allocation

18

FZI Forschungszentrum Informatik

17.12.23

Questions?
David Oberacker – Oberacker@fzi.de

FZI Forschungszentrum Informatik

ESA Space Resources Challenge

20

FZI Forschungszentrum Informatik

17.12.23