As part of my work in Team L3 for the Space Robotics Challenge Phase 2, I developped a Behavior Tree library that was used to specify the virtual rover behavior and qualify us as finalists.

While Finite State Machines (FSMs) have a long history of being used in robotics, their main drawback is their lack of reactivity and modularity. Behavior Trees (BTs) solve these two issues using two-way control transfer instead of one-way control transfer [1].

A behavior tree can be represented as a tree structure. Leaves are either conditions or action nodes. Other nodes of the tree are control flow nodes. A BT can itself take the role of an action in another BT, contributing to modularity. Execution of the BT occurs at a fixed time interval, where a tick signal is generated and propagated from parent node to child node according to the control flow rules. A node can return three execution statuses: success, failure, and running. Execution finishes when the root node returns its execution status.

The Sequence control flow node (symbolized by ->) executes all child nodes until one node returns failure or running. If all nodes succeed, it returns success. The Fallback (also called Selector) control flow node (symbolized by ?) executes the child nodes until one node returns success or running. If all nodes fail, it returns failure.

One nice aspect of BTs is that they can be use to expose the robot's behavioral state by displaying the current execution step. This can be useful for a robot UI.

A second aspect is that the behavior trees can be extended for human interactions. We demonstrated how it can be used to enable partial override by a human operator for example [1], which can be useful in the target Lunar environment of the scenario. This could be extende further with a real dialog with a human operator, enabling more fine grained interaction.

Our Julia behavior tree library is available on github: BehaviorTree.jl

[1] Colledanchise M. and Ögren P. Behavior Trees in Robotics and AI: An Introduction. (2017) arXiv preprint, arXiv:1709.00084.

[2] Human-Robot Teaming Strategy for Fast Teleoperation of a Lunar Resource Exploration Rover