基于Ubuntu 24.04与ROS 2 Jazzy的硬核排错课程,教你用“现象—假设—观测—修复—防御”方法论解决消息丢失、节点静默失败、TF断裂与死锁,并用gdb、valgrind、LTTng深挖系统瓶颈。

原始标题:Debugging ROS 2 Robots: Find Why It Does Nothing

Debugging ROS 2 Robots: Find Why It Does Nothing

《ROS 2 Debugging》 是一门基于 Ubuntu 24.04 和最新的 ROS 2 Jazzy 的硬核排错实战课程 [1]。它拒绝盲目猜测,核心教导一套“现象—假设—关键观测—修复—自动化防御”的科学排错方法论,专门解决消息收不到、节点静默失败、TF 坐标断裂、多线程死锁等高频工程痛点。

该课程的一大亮点是深入 Linux 底层,教授如何使用 gdb、valgrind、LTTng 等高阶工具排查系统崩溃与性能瓶颈,并利用 launch_testing 编写回归测试以确保 Bug 不在 CI 中复现。尽管其采用 AI 合成配音 且需要一定的 C++ 阅读基础,但无需独立 GPU 即可在轻量化仿真的 Nav2 导航和 Headless Gazebo 环境中完成全部硬核实验。

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: 49 Lectures ( 6h 6m ) | Size: 5.7 GB

Real broken ROS 2 states, the one observation that explains each, and a check so it never comes back.

What you’ll learn
⚡ A method for any ROS 2 failure: symptom, hypotheses, the observation that separates them, root cause, regression check.
⚡ Find why messages never arrive: QoS reliability and durability, domains and discovery, names, remaps and types, sim time.
⚡ Fix nodes, packages and launch files that fail quietly: missing executables, overlays, colcon, parameters, conditions.
⚡ Read TF errors correctly: missing frames, extrapolation, two trees, startup timeouts.
⚡ Measure timing honestly: blocked executors, callback groups, dropped messages, latency from header stamps.
⚡ Use the heavy tools on real crashes: ros2 bag to reproduce, gdb backtraces, LTTng traces, valgrind leaks.
⚡ Debug a simulated robot running Nav2 in headless Gazebo: bring-up, initial pose, cmd_vel, costmap, goals, bags.
⚡ Find where the time goes: CPU per node and thread, hot functions, message size and bandwidth, latency under load.
⚡ Keep a bug fixed: launch_testing, graph tests, bag regression tests, one command that CI runs.

Requirements
❗ Python, and basic ROS 2: nodes, topics, launch files, colcon. Reading C++ helps in Section 6.
❗ Ubuntu 24.04 with ROS 2 Jazzy. The setup script installs gdb, LTTng, valgrind, Nav2, Gazebo, MAVROS and the ROS tools used.
❗ A laptop is enough: no GPU, Gazebo runs headless. Leave room on disk for the Nav2, Gazebo and MAVROS packages.

Description
This course contains the use of artificial intelligence. The narration is a synthetic voice; every number on screen comes from a lab you can run.

49 lectures, about 6.1 hours, on ROS 2 Jazzy, on a laptop CPU. Every lecture starts from a real broken state you can reproduce: no messages on a topic that exists, a node that runs old code, a transform that is never found, a timer that slows down, a node that dies with no reason given. You list the hypotheses, find the one observation that tells them apart, fix the cause, and keep a check script that fails if the bug ever comes back. Every lecture has a hands-on part recorded live in a real terminal: reproduce, observe, fix, check again, with every command typed on screen.

Sections 1 to 7 cover topics, packages and launch, TF, timing and the heavy tools. Section 8 runs a TurtleBot3 with Nav2 in headless Gazebo and breaks it in five ways. Section 9 is performance: CPU per node, hot functions, bandwidth and latency under load. Section 10 turns each fixed bug into a regression test with launch_testing, graph checks, bag replays and one command for CI. Section 11 is case files: five problems students asked about in our Q&A, reproduced and solved.

Some of what the labs measured

✅ A reliable subscriber to a best-effort sensor: 0 of about 60 messages arrived, and the only clue was one warning line per node. Lecture 2.1.
✅ ros2 doctor exited 0 and reported 3 of 6 planted faults; the routine in this course finds all 6. Lecture 1.4.
✅ TF stamped from the wrong clock: 30 of 30 lookups failed with ‘extrapolation into the future’; the stamps were 56.8 years apart. Lecture 4.2.
✅ One slow subscription callback cut a 10 Hz control timer to 4 Hz on a single-threaded executor. Lecture 5.1.
✅ A queue depth of 1 lost 294 of 300 messages, with 0 log lines; the sequence numbers showed it. Lecture 5.3.
✅ ros2 run printed only ‘Segmentation fault’ (exit code 245); one gdb backtrace named the line. Lecture 6.2.
✅ Nav2 in headless Gazebo: with the scan stamped in a frame TF does not know, the costmap marked 0 lethal cells around a pillar the laser could see; with the frame ID fixed, 152. Lecture 8.4.
✅ One node at 98.4% CPU while its neighbours sat near 3.2%; pidstat per thread named it, the fix brought it to 4.4%. Lecture 9.1.
✅ A crash seen once on the robot (OverflowError) replayed from a bag inside launch_testing, so it fails a test until the fix lands. Lecture 10.3.

Tools, each used on a real failure: ros2 topic info, node list and param get, ros2 doctor, tf2 view_frames, ros2 bag, gdb, LTTng tracing with tracetools, valgrind and callgrind, Nav2 lifecycle states, pidstat, ros2 topic bw, launch_testing, ss.

What this course does not cover: real hardware, networks across several machines, micro-ROS, and tuning Nav2 itself. The drone case files use a stand-in flight controller, not ArduPilot SITL. No GPU is needed.

Who this course is for
⭐ ROS 2 developers who lose evenings to a topic that is silent or a node that does nothing.
⭐ Students and engineers who finished a ROS 2 beginner course and now meet real failures.
⭐ Not for complete ROS 2 beginners, and not a course about robot hardware.

隐藏内容

此处内容需要权限查看

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

发表回复

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