本课程基于ROS 2 Jazzy,系统讲解BehaviorTree.CPP与py_trees行为树开发,涵盖控制节点、黑板共享与Nav2扩展,并通过43个含缺陷代码与测试的实战实验,助你掌握工业级机器人任务构建与CI/CD门禁测试。

原始标题:Behavior Trees for Robots: ROS 2, Nav2, C++ and Python

Behavior Trees for Robots: ROS 2, Nav2, C++ and Python

该课程是一门面向 ROS 2 Jazzy 环境的机器人行为树(Behavior Trees)高级实战指南,旨在通过理论与工程高度融合的“实验驱动型”教学,帮助学员掌握复杂机器人任务的构建、测试与自动化部署。

课程全面覆盖了工业界主流的 BehaviorTree.CPP (C++) 和 py_trees (Python) 两大主流开发框架,不仅深入剖析控制节点状态、黑板数据共享、动作客户端安全中止等核心机制,还指导学员在 TurtleBot3 仿真环境中直接修改与扩展 Nav2 导航堆栈的行为树逻辑。其最大教学特色在于极强的工程落地性:全课 43 个课时均配备“正确源码、缺陷代码、故障注入脚本与自动化测试”四位一体的独立工作区,并引入了将机器人任务接入 CI/CD(持续集成)流水线进行门禁测试的高阶内容,让学员在零硬件(仅需 Ubuntu 24.04 与 10GB 磁盘空间)的条件下,真正具备编写出高鲁棒性、可量化回归测试的工业级机器人行为控制程序的能力。

Published 10/2026
Created by Frank Robotics Lab
MP4 | Video: h264, 1920×1080 | Audio: AAC, 44.1 KHz, 2 Ch
Level: Intermediate | Genre: eLearning | Language: English + subtitle | Duration: 43 Lectures ( 2h 36m ) | Size: 2.7 GB

Build, test and debug robot missions with BehaviorTree.CPP, py_trees and Nav2. Every lecture has a runnable lab.

What you’ll learn
⚡ Explain ticks, SUCCESS, FAILURE and RUNNING, and predict what a tree does before you run it.
⚡ Write and debug behavior trees in C++ with BehaviorTree.CPP and in Python with py_trees.
⚡ Build recovery, guards, timeouts and cleanup, and measure them with seeded fault injection.
⚡ Run trees inside ROS 2 nodes, including action clients that cancel correctly on halt.
⚡ Read, edit and extend Nav2’s navigation behavior tree in a TurtleBot3 simulation.
⚡ Test and gate a robot mission in CI so a regression fails the build.

Requirements
❗ Python, and the ability to read C++ for Section 2 (you do not need to be an expert).
❗ Basic ROS 2: what a node, a topic, a service and an action are.
❗ Ubuntu 24.04 with ROS 2 Jazzy. No GPU, no robot and no hardware are needed.
❗ About 10 GB of free disk for the packages and the simulation.

Description
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.

Who this course is for
⭐ Robotics software engineers and students who use ROS 2 and want to organise robot behavior properly.
⭐ Developers who have met Nav2’s behavior trees and want to understand and change them.
⭐ Engineers preparing for robotics roles that ask about behavior trees and system integration.
⭐ Not for complete beginners to programming or to ROS 2.

隐藏内容

此处内容需要权限查看

  • 普通3金币
  • 会员免费
  • 永久会员免费推荐
会员免费查看

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注