[KongchangAI]
· 1 min read· 302 words

ROS2 for Absolute Beginners: From the Era of Intelligent Robots to Setting Up a Development Environment

ROS2 for Absolute Beginners: From the Era of Intelligent Robots to Setting Up a Development Environment

A Bilibili ROS2 tutorial breaks down the intelligent robot era, the SDK nature of ROS, and version selection logic.

Based on a widely followed ROS2 beginner tutorial on Bilibili, this article outlines the conceptual framework of the intelligent robot era. It notes that intelligent robots have moved from factories into homes, healthcare, and rescue scenarios, with autonomous mapping and obstacle avoidance, and that AI has given them a "brain." It then clarifies that ROS is not a traditional operating system but an open-source software development kit (SDK). On version selection, the tutorial states that ROS1 is being replaced by ROS2, so new projects should prioritize ROS2, and emphasizes the importance of maintenance dates, recommending that beginners use a maintained stable release rather than a rolling release. It concludes with two suggestions: build a correct conceptual map and prioritize stable versions.

Intelligent robots are moving from factories into daily life, and one of the core software technologies that makes these robots "move" is the Robot Operating System, ROS. A widely followed ROS2 beginner tutorial on Bilibili breaks down this seemingly daunting development toolkit in plain language. Based on that tutorial, this article outlines the background of the intelligent robot era, the essential positioning of ROS, and the practical logic behind version selection, helping beginners build a clear conceptual framework.

The Era of Intelligent Robots Has Arrived

The tutorial opens with a robot performance on a Spring Festival Gala stage, pointing out that intelligent robots have moved from official platforms into the public eye—meaning "the future is already here." In everyday life, robot vacuum cleaners and hotel food-delivery robots are familiar examples. These devices are fundamentally different from the robotic arms in factories that repeat preset motions: they have begun to acquire a "brain," enabling them to autonomously explore environments, build maps, and avoid obstacles. According to the tutorial, a home robot vacuum first scans the entire house to form a map, then works according to that map—precisely a manifestation of intelligence.

For example, home service

机器人技术的演进路径很清晰:从传统工业制造领域,向家庭服务、医疗看护、教育娱乐、救援探索、军事应用等领域迅速扩展。教程以无人机携带导弹的战场视频为例,说明危险场景中机器替代人的价值——机器受损可以修复,人的伤害却不可逆。

人工智能为机器人装上了"大脑"

教程的核心观点之一是:人工智能与机器人的结合,是机器人获得智能的关键。过去机器人没有"大脑",只能执行人所设定的指令;如今 AI 技术可以赋予机器人思考与适应能力,使其更灵活、更符合人的心意。教程提到,AIGC 等人工智能分支正在为机器人注入新的能力,机器人时代将像互联网一样,再次为人们的生活带来全新革命。

它也属于人工智能的一个分支

这一判断在教程视频展示的多个应用场景中得到了印证:医疗领域的手术机器人、无人机、人工智能驾驶等,都属于智能机器人的范畴。硬件是机器人的载体,软件则赋予其灵魂——这正是学习 ROS 的意义所在。

什么是 ROS?它其实是一个 SDK

教程特别澄清了一个常见误解:尽管 ROS 的字面意思是"机器人操作系统",但它并不是传统意义上的操作系统。手机上的 Android 和 HarmonyOS,电脑上的 Windows、Linux 和 macOS 属于经典操作系统,而 ROS 本质上是一个用于构建机器人应用程序的软件开发工具包(SDK)。它由一组软件库和若干工具组成,并且完全开源。

OS 操作系统

这一定位对初学者很重要:不要把 ROS 当成一个需要"安装"的操作系统,而应把它理解为开发机器人软件的工具集合。教程强调,软件层面最热门的技术之一就是机器人操作系统,它是机器人开发绕不开的基础设施。

SDK(Software Development Kit,软件开发工具包) 是一组用于辅助开发某类软件的工具集合,通常包含库文件、API 接口、编译器配置、调试工具和文档等。与操作系统不同,SDK 不负责管理硬件资源或调度进程,而是为开发者提供现成的功能模块,减少从零造轮子的工作量。例如,Android SDK 让开发者能够调用手机传感器和界面组件,而无需直接操作底层驱动。把 ROS 理解为 SDK,意味着它提供的是通信机制、坐标变换、导航算法等机器人常用功能的封装库,开发者通过调用这些库来组装自己的机器人应用。这一区分帮助初学者避免把 ROS 当作需要安装的系统镜像,而是作为开发环境中的依赖框架来使用。

为什么 ROS2 成为课程的主角

经过多年发展,ROS 形成了 ROS1 和 ROS2 两个大版本。教程明确指出,ROS1 正在被 ROS2 逐步取代;尽管仍有存量项目在使用 ROS1,但新项目更多选择 ROS2。课程选择 ROS2 作为教学版本,是因为新版本在性能和架构上更优,而且 ROS2 正冉冉升起,在可预见的未来很长一段时间内仍将是机器人开发的中坚力量。

要用的这个版本

版本维护日期是教程反复强调的实用知识点。不同版本有不同的停止维护时间:部分老旧版本已停止维护,一些版本仍在持续维护,而最新版本计划维护到更晚的年份。课程建议学习者选择仍在维护且相对成熟的稳定版,而不是 rolling 滚动开发版本——后者可以理解为"抢先版",更新快但稳定性不足,适合尝鲜,不建议作为学习基础。

教程还提醒,不同版本之间的项目源码不能直接兼容运行,要么切换环境版本,要么修改配置进行适配。因此后续课程的所有源码都统一使用指定版本;学习者如果集成网上其他版本的代码,需要参照文档做相应修改。

ROS1 与 ROS2 的架构差异是理解版本替代逻辑的关键。ROS1 依赖一个中心化的 Master 节点来协调所有进程间的通信;一旦 Master 崩溃,整个系统可能瘫痪,而且难以适应多机器人协作和实时性要求高的场景。ROS2 则采用去中心化的数据分发服务(DDS)作为通信中间件,各节点可以直接发现并通信,无需中心节点,同时支持实时控制、多操作系统(包括 Windows 和实时 OS)以及更完善的安全机制。这些底层重构使 ROS2 更适合产品化和工业部署,也正是教程建议新项目直接采用 ROS2 的根本原因。

rolling 滚动开发版本是 ROS 社区中持续集成最新代码的分支,类似软件领域的"每日构建版"。它不设固定维护周期,功能更新最快,但接口和依赖可能频繁变动,稳定性无法保证。与之相对的是固定发布版(如 Humble、Iron 等),每个版本都有明确的维护截止日期和长期支持承诺。教程建议初学者避开 rolling 版,是因为学习阶段需要可复现的环境和稳定的代码示例,频繁的破坏性更新会打断学习节奏。如果想体验最新特性,可以在掌握基础后单独搭建 rolling 环境进行实验,而不是把它作为日常开发的主线。

给初学者的两点建议

第一,建立正确的概念地图。ROS 不是操作系统,而是开发工具包;ROS2 是当前的主流方向;版本兼容性是实际开发中绕不开的坑。把这些概念理清,再动手搭建环境,能少走很多弯路。

第二,优先选择稳定版本。教程的态度很明确:基础阶段用稳定版足够,不必追求最新特性。课程本身就以稳定版为主线,这套选择逻辑对自学者同样适用。

从智能机器人的时代背景,到 ROS 的 SDK 本质,再到版本维护与选择策略,这套教程用通俗的讲解完成了入门认知的铺垫。接下来才是真正的动手环节——构建环境、编写代码、让机器人"活"起来。

#ROS2#robot operating system#ROS1 vs ROS2#SDK#intelligent robots#beginner tutorial
Share:

Related articles