Lesson reading
live
50 min
Start with the lesson question, connect the representations, and test the model with evidence.
Inspect the opening phenomenon
Predict what changes, then name the evidence.
Apply in the lab
Name the evidence before reading the answer.
Read only what helps
Then use the lab and recall check.
More when needed
Transcript and resources stay available below.
Course progress
Nodes, Messages, and Topics
Decision challenge
Use the opening example to make a prediction, identify evidence, and explain which model supports it.
Predict whether the publisher is necessarily broken.
Before
Predict whether the publisher is necessarily broken.
During
Track node, topic name, message type, and direction.
After
Name three evidence checks for a silent subscriber.
Lesson reading
live
50 min
Video script
draft
Transcript fallback
available
courses/ai-robotics/modules/04-programming-robot-systems-with-ros2/lessons/01-nodes-messages-and-topics/video-transcript.md
Inspect a ROS 2 Data Path
draft
30 min
Mastery check
live
6 questions / 10 min
# Transcript If a camera publishes obstacles but the safety monitor sees nothing, which part is broken? Start with the ROS 2 graph. A node has a focused responsibility. A message is one strongly typed data sample. A topic is the named asynchronous stream carrying those samples. The camera can publish `ObstacleArray` messages to `/camera/obstacles`, while safety and navigation subscribe independently. The camera does not need to know those subscribers. Communication requires the same topic name, a compatible message type, and compatible delivery settings. Diagnose in order: confirm the node exists, confirm the topic name, inspect the type, check publisher and subscriber counts, then inspect samples. A topic is a live named stream—not automatically a mailbox and not a node. What three checks would you make before blaming the camera? Inspect the complete graph in the EduQuest lab.
Reading lab
Connect the lesson's words, diagrams, graphs, evidence, and equations.
Opening challenge: A camera publishes obstacles, but the safety monitor receives nothing. Is the camera broken—or is the graph disconnected?
A node is a running ROS 2 participant with a focused responsibility. A camera node might detect obstacles; a safety node might watch them; a navigation node might plan around them. Nodes are not required to know each other's implementation.
A message is a strongly typed data sample. Its fields and their meanings form a contract. A topic is a named asynchronous stream. Publishers write messages to the stream; any number of compatible subscribers may receive them.

Assume /camera_node publishes ObstacleArray messages on /camera/obstacles. Both /safety_monitor and /navigation_node subscribe:
ObstacleArray sample./camera/obstacles.The endpoints need the same topic name and a compatible message type. Quality-of-service settings can also affect compatibility; this lesson keeps QoS at defaults and returns to delivery policy later.
Use a ROS 2 environment with turtlesim, or study the sample output below:
ros2 node list
ros2 node info /turtlesim
ros2 topic list -t
ros2 topic info /turtle1/cmd_vel
ros2 interface show geometry_msgs/msg/Twist
ros2 topic echo /turtle1/pose
For each command, ask: Which node? Which topic name? Which message type? Which direction? ros2 topic echo behaves as an additional subscriber; it does not interrupt the existing flow.
| Evidence | Likely issue | Next check |
|---|---|---|
| Topic absent | publisher not running or different name | ros2 node list, ros2 topic list |
| Topic exists; type differs | contract mismatch | ros2 topic list -t |
| Name and type match | discovery or QoS mismatch | ros2 topic info --verbose |
| Messages arrive but behavior is wrong | meaning, units, frame, or downstream logic | inspect interface and sample values |
Without looking back, explain why a recorder can subscribe to a sensor topic without modifying the sensor node. Then name three checks for a subscriber that receives no data.
Nodes divide responsibilities. Messages define typed samples. Topics provide named asynchronous streams. Diagnose the graph from evidence—node, topic name, type, direction, and delivery compatibility—rather than guessing which program is broken.
Build or analyze a publisher-subscriber graph and diagnose one deliberately broken connection.
Preferred: ROS 2 with turtlesim. Fallback: use the transcript and graph table in this lab without installing software.
turtlesim_node and turtle_teleop_key, or use the supplied sample graph.ros2 node list and record focused responsibilities.ros2 topic list -t; record topic names and message types./turtle1/cmd_vel with ros2 topic info and geometry_msgs/msg/Twist with ros2 interface show./turtle1/pose and explain why the command acts as another subscriber./turtle1/cmd_ve1, or assign the wrong type.Your table identifies at least two nodes, two topic streams, each stream's type and direction, and a defensible diagnosis for the broken connection.
ros2 topic list -t.Add a hypothetical recorder node and explain what changes in publisher/subscriber counts.
The entire activity can be completed from the printed graph and sample outputs. No robot hardware or motor power is required. Use a screen reader-friendly table instead of the visual when needed.