
This course contains the use of artificial intelligence.
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.
How the course is built
Each lecture is about 3 to 4 minutes, 2.6 hours in total. The narration is a synthetic voice, and the pictures are generated from the real runs: the tree colours follow a recorded tick trace, and the code and terminal output on screen are the code and output that ran. Every lecture's folder is attached to that lecture as its own zip, each section has a PDF of notes, and the full course is one zip in lecture 1.1.
What this course does not cover
No real robot and no hardware. No MoveIt. No Groot editor. No reinforcement learning or perception. Results come from small simulations and mock worlds with stated fault models, so they show how the trees behave in those setups, not how your robot will perform. It is not an introduction to programming or to ROS 2.
You need Ubuntu 24.04 with ROS 2 Jazzy, Python, and the ability to read C++ for Section 2. No GPU is needed. Lecture 1.1 and the setup and verify scripts show exactly how to check your machine.