ROS 2 Foundations · Lesson 1 of 6

Lesson 01

What Is ROS 2?

Before you write a line of code, let's get the big picture: what ROS 2 actually is, why nearly every robotics team uses something like it, and the one core idea — the graph — that the rest of this course builds on.

A robot is a team of small programs

Imagine a small delivery robot rolling down a sidewalk. To do that, it has to do many things at the same time:

You could try to write all of that as one giant program. But that program would be enormous, fragile, and impossible for a team to work on together. If the path-planning part crashed, the whole robot would die.

Instead, robotics engineers split the work into many small, independent programs that each do one job well, and then let those programs talk to each other. ROS 2 is the system that lets them talk.

Definition

ROS 2 (Robot Operating System 2) is a free, open-source set of software libraries and tools for building robot applications. Despite the name, it is not an operating system like Windows or Linux — it runs on top of one. Think of it as the "nervous system" that carries messages between the parts of a robot.

The core idea: the graph

In ROS 2, each small program is called a node. A node does one focused job — for example, a camera_node, a path_planner, or a motor_driver.

Nodes don't call each other directly. Instead they exchange messages over named channels called topics. A node can publish (send) messages to a topic, and any number of other nodes can subscribe (listen) to that topic.

  [ camera_node ] --publishes--> (/image) --subscribed by--> [ path_planner ]
                                                                    |
                                                          publishes (/cmd_vel)
                                                                    |
                                                                    v
                                                             [ motor_driver ]

This web of nodes and topics is called the ROS graph. It's exactly the kind of diagram you saw on the Voyager Lab home page: circles (nodes) connected by lines (topics like /vision, /nav, and /cmd_vel).

Because nodes are independent, this design gives you three big wins:

Ways nodes talk: topics, services, and actions

Topics are the most common, but ROS 2 gives you three communication styles, each for a different situation. You'll use all three in this course:

Why "2"? A quick bit of history

The original ROS launched in 2007 and became the standard in robotics research. But it was built for one robot in a lab, on a trusted network. ROS 2 is a ground-up rewrite for the real world: multiple robots, unreliable Wi-Fi, real-time control, and commercial products. It handles messaging using an industrial standard called DDS (Data Distribution Service), which is why ROS 2 nodes can discover and talk to each other automatically, even across different computers.

ROS 2 ships as named distributions (like Ubuntu does). This course targets Humble Hawksbill (long-term support, very stable) and Jazzy Jalisco (newer). Either works — we'll point out any differences.

Check your understanding

Without scrolling up, answer these to yourself:

  1. What is a node, and what is a topic?
  2. In the diagram above, which node publishes to /cmd_vel, and which one subscribes to it?
  3. You want one node to ask another "what's your current battery level?" and get a single answer back. Topic, service, or action?

(Answers: 1 — a node is a small single-purpose program; a topic is a named channel it sends/receives messages on. 2 — path_planner publishes /cmd_vel; motor_driver subscribes. 3 — a service.)

Key takeaways