A behavior tree is how a robot’s decisions are written down so you can read them, test them and change them. This course teaches them with two libraries, BehaviorTree.CPP in C++ and py_trees in Python, and then puts them inside ROS 2 and Nav2 in a simulated TurtleBot3. Every one of the 43 lectures has a folder you can run: the code from the video, a broken copy with one classic mistake, a script that passes only when the fixed version works and the broken one is caught, and the numbers the lecture quotes. If a number is in the video, the code that produced it is in the folder.
What you will do:
- Compare the same mission as a flat state machine and as a tree, and see where each one costs you.
- Learn ticks, statuses, sequences, fallbacks, decorators and parallel nodes by running them.
- Write trees in C++ with BehaviorTree.CPP: ports, the blackboard, running actions, halting, subtrees, XML.
- Write trees in Python with py_trees: behaviours, blackboard, memory, decorators, visitors, unit tests.
- Build recovery, guards, timeouts and cleanup, and measure them over seeded fault-injection runs.
- Run trees inside ROS 2 nodes: topics, services, action clients that cancel on halt, mock servers, launch tests.
- Read and edit Nav2’s own navigation tree, load a custom plugin, and measure navigation with and without recovery in simulation.
- Finish with a mission, a regression suite, a CI gate and a capstone you can show.







