Welcome to A Guide to ROS2 — A Guide to ROS2

Overview

Robot Operating System 2 (ROS2), is a modern middleware framework for robotics development. It is designed to support real-time control, distributed systems, and scalable multi-robot applications.

This module uses ROS 2 as the foundation because:

In this module, I’ll give you a simplified introduction to key ROS 2 concepts to help you get started. For more detailed information, refer to the linked guide at the top of this page.

Basic ROS2 Concepts

ROS 2 is built on a modular architecture. This means it breaks a robot’s software system into separate, manageable parts that each handle a specific task.

Some of the core building blocks in ROS 2 include:

Nodes and Topics

In ROS 2, nodes are the basic execution units. Each node should be responsible for a singular, modular purpose — such as sensing, processing data, or controlling motors. Nodes are designed to run independently, making it easy to develop and debug different parts of a robot separately.

The communication between nodes are enabled by messages. A message is a structured data format that contains specific fields for data values. It can contain a simple value (like temperature) or complex structures (like a robot's position in space). The structure of a message is defined in its .msg file.

To transmit messages, ROS 2 uses topics. When a node wants to send data, it publishes a message to a topic. Other nodes that need this data will subscribe to the same topic to receive those messages. This model is asynchronous and allows for flexible, real-time communication between multiple nodes.