# Business Logic

# Overview

<span style="white-space: pre-wrap;">Business Logic is encoded in </span>[Behavior Trees](https://arxiv.org/pdf/1709.00084 "Behavior Trees in Robotics and AI: An Introduction")<span style="white-space: pre-wrap;"> (do check out the link, it's the nicest introduction to BTs there is). We use </span>[BehaviorTree.CPP](https://www.behaviortree.dev/)<span style="white-space: pre-wrap;"> library for this. All business logic lives in the </span>[rtt\_behavior package](https://github.com/RoboTeamTwente/erc-software-rover/tree/main/src/rtt_behavior).

<span style="white-space: pre-wrap;">There's a bunch of BTs sketched out in the </span>`<span class="editor-theme-code">docs/business-logic.cts</span>`<span style="white-space: pre-wrap;"> file (</span>[in the same repo](https://github.com/RoboTeamTwente/erc-software-rover/blob/main/docs/business-logic.cts)<span style="white-space: pre-wrap;">). You can open it in </span>[TreeSheets](https://strlen.com/treesheets/).

<p class="callout warning">None of this code was ever run in production, just FYI</p>