ROS2 Beginner's Guide: Understanding the Core Framework for Robot Development from Scratch

A comprehensive beginner's guide to ROS2, the core framework for modern robot development.
This guide introduces ROS2 (Robot Operating System 2), the essential open-source framework for robot development. It covers the rise of intelligent robotics, explains what ROS2 is and how it differs from ROS1, compares key versions like Humble and Jazzy, addresses version compatibility issues, and provides a recommended learning path for beginners entering the robotics field.
The Era of Intelligent Robots Has Arrived
From robots dancing gracefully on the Spring Festival Gala stage, to robot vacuums autonomously planning paths at home, to service robots shuttling through hotels delivering meals — intelligent robots have quietly become part of our daily lives. This marks the dawn of the intelligent robotics era, and mastering the relevant development technologies opens the door to better career opportunities.
Since the 1970s and 1980s, driven by advances in computer technology, sensor technology, and electronics, robotics has rapidly expanded from traditional industrial manufacturing into fields such as home services, healthcare, education and entertainment, search and rescue, and military applications. Traditional industrial robots (like robotic arms in automotive factories) can only execute tasks based on preset instructions and lack autonomous decision-making capabilities. Typical examples include SCARA robots and six-axis robotic arms, which use teach pendants or offline programming to predefine motion trajectories, repeatedly performing welding, painting, and material handling tasks in highly structured environments. Their core control method is position-based trajectory planning — essentially an "open-loop" or simple "closed-loop" control approach. Modern intelligent robots, by integrating with artificial intelligence, are beginning to possess "thinking" capabilities such as environmental perception, path planning, and obstacle avoidance. These capabilities rely on key technologies like SLAM (Simultaneous Localization and Mapping), computer vision, and deep learning, along with sensor fusion technologies (such as multi-source data fusion from LiDAR, RGB-D depth cameras, and IMU inertial measurement units) and improved edge computing capabilities, enabling robots to make the qualitative leap from "pre-programmed execution" to "autonomous decision-making."

With the rapid development of artificial intelligence, robotics is experiencing entirely new opportunities. The deep integration of AI and robotics is bringing yet another profound transformation to human society. From the explosion of AIGC technologies like ChatGPT, DeepSeek, and ERNIE Bot, these AI technologies can give robots a "brain," evolving them from simple command executors into intelligent agents with cognitive capabilities.
The explosion of AIGC (AI Generated Content) technology is marked by the release of ChatGPT in late 2022, driven by breakthrough advances in Large Language Models (LLMs) and the Transformer architecture. In the robotics field, these technologies go far beyond voice interaction. For example, Google's RT-2 (Robotics Transformer 2) model can directly translate the reasoning capabilities of vision-language models into robot control commands, enabling robots to understand complex tasks described in natural language and autonomously complete operations. Domestic large models like DeepSeek and the multimodal AI capabilities represented by ERNIE Bot allow robots to simultaneously process text, images, speech, and other types of information, achieving more natural human-robot interaction. The concept of "Embodied AI" — giving AI a physical body to interact with the real world — is becoming one of the most cutting-edge research directions in artificial intelligence.

What Is ROS2: The Core Framework for Robot Development
Hardware is the carrier of a robot, while software gives an intelligent robot its soul. On the software side, Robot Operating System (ROS) is one of the most essential technologies. ROS stands for Robot Operating System — it is a development toolkit for building robot applications, consisting of a collection of software libraries and tools, and it is fully open source.
It's important to note that although ROS is called a "Robot Operating System," it is not an operating system in the traditional sense. Unlike classic operating systems such as Windows, Linux, or macOS, ROS is more accurately described as an SDK (Software Development Kit). It runs on top of a traditional operating system, providing a standardized framework and toolchain for robot software development.
To understand this distinction, consider the core responsibilities of an operating system: managing hardware resources (CPU scheduling, memory allocation, device drivers), process management, file systems, and other low-level functions. ROS does not handle any of these low-level tasks. It runs on Linux (primarily Ubuntu) and provides a set of middleware and tools tailored for robot development. Specifically, ROS offers inter-process communication mechanisms (such as Topics, Services, and Actions), a hardware abstraction layer, device driver interfaces, common function libraries (navigation, kinematics, perception, etc.), package management tools, and visualization and simulation tools (such as RViz and Gazebo). Think of ROS as analogous to the Unity engine in game development — Unity itself is not an operating system, but it provides a complete framework and toolchain for game development, so developers don't need to write rendering engines, physics engines, and other foundational components from scratch. Similarly, ROS allows robot developers to stand on the shoulders of giants, focusing on their application logic rather than reinventing the wheel.

ROS2 Version Evolution and Selection Guide
After years of development, ROS has produced two major version series: ROS1 and ROS2. ROS2 is a comprehensive iterative upgrade over ROS1, with significant improvements in architecture design, real-time performance, and security. The industry is currently transitioning from ROS1 to ROS2, and new projects overwhelmingly adopt ROS2 for development.
The background of this upgrade is worth understanding in depth. ROS1 was originally designed in 2007, developed by Willow Garage, primarily targeting academic research scenarios. Its architecture had several fundamental limitations: First, ROS1 relied on a centralized Master node (roscore) for node discovery and communication coordination. If the Master crashed, the entire system would go down — an unacceptable single point of failure risk in industrial and commercial applications. ROS2 completely eliminated the Master node, adopting DDS (Data Distribution Service) as the underlying communication middleware. DDS is an industrial-grade communication standard defined by OMG (Object Management Group), widely used in aerospace, defense, finance, and other fields with extremely high reliability requirements, supporting a decentralized automatic node discovery mechanism. Second, ROS1 lacked real-time guarantees and could not meet the needs of time-sensitive control tasks (such as servo control of robotic arms requiring microsecond-level responses). ROS2 supports Real-Time Operating Systems (RTOS) and allows developers to fine-tune communication reliability, latency, and bandwidth through QoS (Quality of Service) policies. Additionally, ROS2 natively supports multi-robot systems, cross-platform operation (Linux, Windows, macOS), and enterprise-grade features like lifecycle management.
The first version of ROS2 was released in 2017, and it has maintained a steady update cadence since then. From a version planning perspective, each version has a clearly defined maintenance period and end-of-life date, which is crucial for long-term project planning.

The mainstream ROS2 versions currently available include the following three:
Foxy Fitzroy
This version reached end-of-life in May 2023, but due to its early release and mature ecosystem, some legacy projects still use it. It is not recommended for new projects.
Humble Hawksbill
This is currently the most widely used stable version, with planned maintenance until May 2027. A large number of existing projects are built on this version, and it has the most comprehensive documentation and community support.
Jazzy Jalisco
This is the latest LTS (Long Term Support) version, with planned maintenance until May 2029. New projects are recommended to prioritize this version to benefit from the longest technical support cycle and the latest features.
LTS (Long Term Support) is a version release strategy widely adopted by open source software communities — Ubuntu, Node.js, Java, and other projects follow similar patterns. LTS versions commit to providing security patches and critical bug fixes over an extended period (typically 3-5 years), ensuring long-term stable operation of projects. It's worth noting that ROS2 version names follow an alphabetically increasing rule, with each version named using an adjective-noun combination (e.g., Humble Hawksbill means "humble hawksbill sea turtle"). This continues the ROS community's tradition of naming with turtle-related elements — a tradition that originated from the classic turtlesim turtle simulator in ROS introductory tutorials. When selecting a version, also note that each ROS2 version corresponds to a specific Ubuntu version (e.g., Jazzy corresponds to Ubuntu 24.04). Ensuring the operating system version matches is a prerequisite for successful installation.
Rolling Development Version
In addition to the stable versions above, ROS2 also offers a Rolling development version. This version has been continuously updated since its release in June 2020, with no fixed end-of-life date. Think of the Rolling version as an "early access" edition — you get to experience the latest features first, but stability is not as guaranteed as officially released LTS versions. For production environments and learning purposes, stable versions are recommended over the Rolling version.
ROS2 Version Compatibility Considerations
Compatibility issues exist between different ROS2 versions, and this is a critical point that developers must take seriously. A project developed on the Humble version cannot run directly in a Jazzy environment, and vice versa. If you need to use code across versions, you'll need to make corresponding configuration changes and API adaptations according to the official documentation.
Therefore, during learning and development, always verify that the tutorials and example code you're using match the ROS2 version in your environment to avoid compilation errors or runtime anomalies caused by version mismatches.
ROS2 Learning Tips and Getting Started Path
For beginners, it is recommended to learn with the Jazzy Jalisco version. This not only provides the longest technical support cycle but also exposes you to the latest design philosophies and best practices. Since Jazzy is the current latest LTS version, related learning resources and community discussions are also growing rapidly.
As ROS2 continues to mature, it's foreseeable that ROS will remain a cornerstone of robot development for a long time to come. Mastering ROS2 technology means seizing a core competitive advantage in the era of intelligent robotics. Whether in industrial automation, service robotics, autonomous driving, or education and research, ROS2 will play a pivotal role.
Through systematic study of ROS2's core concepts, communication mechanisms, and toolchain usage, developers can rapidly build fully functional robot applications while leveraging the rich resources accumulated by the open source community. ROS2's communication mechanisms are among its most essential design elements, encompassing three main patterns: Topics use a publish-subscribe model, suitable for continuous data transmission such as sensor data streams — for example, a LiDAR continuously publishes scan data while a navigation module subscribes to this data for map building. Services use a request-response model, suitable for one-time operations that require result confirmation. Actions are an enhanced version of services, supporting long-running tasks with intermediate feedback. Additionally, Nodes, Packages, Workspaces, and Launch Files are also core concepts that need to be mastered. A Node is the smallest executable unit in ROS2, with each node responsible for an independent function (such as a camera driver node, object detection node, or motion control node). Nodes collaborate through communication mechanisms, forming a loosely coupled distributed system architecture. This design greatly improves code reusability and system maintainability.
This is a technology direction full of opportunities, well worth in-depth exploration by every developer interested in robotics.
Related articles

Instacart Launches AI Shopping Assistant Clementine: Reimagining the Online Grocery Shopping Experience
Instacart launches Clementine, a conversational AI shopping assistant offering smart recommendations, natural language interaction, and nutrition advice to transform online grocery shopping.

Geiger: A Deep Dive into AI Agent Behavior Monitoring
Deep dive into Geiger, an AI agent monitoring tool. Explore runtime observability, prompt injection risks, and security strategies for local AI agents.

Open-Source AI Agents for Computer Control: A Comprehensive Guide to Multi-Model Integration
Explore how open-source AI Agent frameworks enable computer control with multi-model support. Compare AutoGPT, LangChain, and Open Interpreter with DeepSeek V3 integration.