Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Debugging ROS 2 Robots: Find Why It Does Nothing
New

Debugging ROS 2 Robots: Find Why It Does Nothing

Real broken ROS 2 states, the one observation that explains each, and a check so it never comes back.
Last updated 10/2026
English
English

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.

Course content

11 sections • 49 lectures • 6h 6m total length
  • 1.1 How to follow this course8:53
  • 1.2 Setup and verify: PASS must mean it works8:27
  • 1.3 The method: from symptom to regression check9:15
  • 1.4 What ros2 doctor sees, and what it does not9:08

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.