【ChatGPT 深度研究】工业机器人的开源架构(双语)

明白了。我将为您撰写一份超过10页的详细技术研究报告,面向技术研发人员,聚焦主流开源工业机器人系统架构,采用英文资料作为参考,并包括图表、对比表和典型案例研究。

我会深入分析ROS、ROS 2、LinuxCNC及其他工业自动化相关的开源系统架构,重点讨论它们在不同工业机器人等级中的适用性、性能、安全性、工业协议支持、高级功能实现能力等维度。

请稍等,我完成后会第一时间通知您。

Open-Source Architectures for Industrial Robotics

The industrial robotics domain now relies on a variety of mature open-source frameworks and middleware stacks. Notable examples include ROS/ROS 2 (Robot Operating System), ROS-Industrial (an extension of ROS for manufacturing), Orocos/ROCK (Real-Time Toolkit and Robot Construction Kit), YARP (Yet Another Robot Platform), and LinuxCNC for CNC control. These platforms differ in design and focus, but all are used in real robot and automation projects. For example, the KUKA industrial manipulator shown below is the type of robot often targeted by such frameworks (with ROS-Industrial providing specific drivers and interfaces for major robot brands).工业机器人领域目前依赖于多种成熟的开源框架和中间件堆栈。典型代表包括 ROS/ROS 2(机器人操作系统)、ROS-Industrial(面向制造业的 ROS 扩展)、Orocos/ROCK(实时工具包与机器人构建套件)、YARP(Yet Another Robot Platform)以及用于数控的 LinuxCNC。这些平台在设计理念和应用侧重上各有不同,但均被实际应用于机器人及自动化项目中。例如下图所示的 KUKA 工业机械臂,正是此类框架常针对的机器人类型(ROS-Industrial 就为各大机器人品牌提供了专用驱动与接口)。

Figure: A 6-axis industrial robot arm (KUKA-type manipulator) in a manufacturing setting.图:制造环境中的 6 轴工业机器人手臂(KUKA 型机械手)。

  • ROS/ROS 2 – The Robot Operating System (ROS) is by far the most widely used open-source robotics middleware. ROS provides a modular publish/subscribe architecture with tools for hardware abstraction, sensors, state estimation, visualization (RViz), simulation (Gazebo), motion planning (MoveIt), and more. Over 80,000 developers have used ROS (and ROS2), contributing well over 200,000 packages. ROS itself is not a real-time OS and traditionally uses a central master node and TCP-based message passing; ROS 1 lacks hard real-time guarantees. ROS 2 is a redesigned version that uses DDS (Data Distribution Service) for real-time-capable communication (with QoS/security support) and runs on Linux, Windows, and RTOS environments. (ROS-Industrial adds drivers for EtherCAT/CANopen/Profinet networks, enabling ROS to interface with industrial controllers.)ROS/ROS 2——机器人操作系统(ROS)是目前使用最广泛的开源机器人中间件。ROS 采用模块化的发布/订阅架构,提供硬件抽象、传感器、状态估计、可视化(RViz)、仿真(Gazebo)、运动规划(MoveIt)等工具。超过 80,000 名开发者使用过 ROS(及 ROS2),贡献了逾 200,000 个软件包。ROS 本身并非实时操作系统,传统上依赖中心主节点和基于 TCP 的消息传递;ROS 1 缺乏硬实时保障。ROS 2 是重新设计的版本,采用 DDS(数据分发服务)实现支持实时通信(含 QoS/安全功能),可运行于 Linux、Windows 及 RTOS 环境。(ROS-Industrial 扩展了 EtherCAT/CANopen/Profinet 网络驱动,使 ROS 能与工业控制器交互。)

  • YARP – An open-source C++ middleware originally developed for the iCub humanoid. YARP emphasizes peer-to-peer communication among modular processes and supports many transport types (TCP, UDP, shared memory, HTTP, etc.). It is used on Windows, Linux, and macOS. YARP is geared toward code reuse and flexible hardware interfacing rather than strict real-time control. While smaller than the ROS community, YARP underpins sophisticated humanoids like iCub.YARP——一个最初为 iCub 人形机器人开发的开源 C++中间件。YARP 强调模块化进程间的点对点通信,支持多种传输类型(TCP、UDP、共享内存、HTTP 等)。它可在 Windows、Linux 和 macOS 上运行。YARP 侧重于代码复用和灵活的硬件接口,而非严格的实时控制。尽管社区规模小于 ROS,YARP 支撑着 iCub 等复杂人形机器人系统。

  • Orocos/ROCK – Orocos is a collection of portable C++ libraries for high-performance robot control (Real-Time Toolkit, Orocos Component Library, Kinematic Dynamics, etc.). Orocos is explicitly designed for hard real-time control loops and motion control; it includes a Hardware Abstraction Layer and real-time state machines. The ROCK framework builds on Orocos RTT to provide ready-to-use components and drivers for research and industry. Orocos/ROCK applications are typically written in C++, with some XML/YAML for configuration. The Orocos community is smaller and research-oriented, but Orocos is proven in advanced control tasks. (For example, Orocos-based components can interface with EtherCAT via the open RTT-SOEM libraries.)Orocos/ROCK —— Orocos 是一套可移植的 C++库集合,用于高性能机器人控制(实时工具包、Orocos 组件库、运动学动力学等)。Orocos 专为硬实时控制回路和运动控制而设计,包含硬件抽象层和实时状态机。ROCK 框架基于 Orocos RTT 构建,为研究和工业应用提供即用型组件和驱动程序。Orocos/ROCK 应用程序通常用 C++编写,部分配置使用 XML/YAML。Orocos 社区规模较小且以研究为导向,但 Orocos 在高级控制任务中已得到验证。(例如,基于 Orocos 的组件可通过开源的 RTT-SOEM 库与 EtherCAT 交互。)

  • LinuxCNC – An open-source CNC control system (GPLv2) for machine tools and robots on a PC running a real-time Linux kernel. LinuxCNC implements traditional G-code motion control with a real-time HAL (Hardware Abstraction Layer) and integrated PLC; it can handle up to 9 axes of motion. It requires an RT-PREEMPT or RTAI-patched kernel to achieve millisecond-level update cycles. LinuxCNC supports a variety of I/O interfaces (PCI, PCIE, parallel port, Mesa cards, etc.) and relies on “dumb” external motion hardware, making it highly deterministic. Its community is focused on machining and DIY CNC rather than broad robotics.LinuxCNC——一款开源 CNC 控制系统(GPLv2),用于在运行实时 Linux 内核的 PC 上控制机床和机器人。该系统通过实时 HAL(硬件抽象层)和集成 PLC 实现传统 G 代码运动控制,可支持多达 9 轴运动。需搭配 RT-PREEMPT 或 RTAI 补丁内核才能实现毫秒级更新周期。LinuxCNC 支持多种 I/O 接口(PCI、PCIE、并口、Mesa 卡等),依赖"哑"外部运动硬件,因而具有高度确定性。其社区主要关注机械加工和 DIY CNC 领域,而非广义机器人技术。

  • Other frameworks: A few other open projects exist (e.g. SmartSoft, GenoM, RoboComp) but none approach ROS in adoption. The ROS-Industrial initiative is worth noting: it packages ROS tools and libraries specifically for factory robots, providing vendor-supported interfaces (e.g. ABB, FANUC, KUKA) and fieldbus drivers (EtherCAT, PROFINET).其他框架:还存在一些其他开源项目(如 SmartSoft、GenoM、RoboComp),但在采用率上都无法与 ROS 相提并论。值得一提的是 ROS-Industrial 计划:它专门为工业机器人打包了 ROS 工具和库,提供供应商支持的接口(如 ABB、FANUC、KUKA)和现场总线驱动(EtherCAT、PROFINET)。

ROS / ROS 2: Architecture and FeaturesROS / ROS 2:架构与特性

Core architecture: ROS is a distributed middleware. A ROS graph consists of independent nodes (processes) that exchange messages via topics, services, or actions. ROS provides standard support for hardware abstraction (urdf robot models, ros_control interfaces), device drivers (cameras, LIDAR, motors), and shared libraries for common tasks. All ROS communications flow through a network layer (TCPROS/UDPROS in ROS 1) or DDS (in ROS 2). Key ROS concepts include the parameter server, roslaunch, and the extensive package ecosystem (each package bundles code, message definitions, and configs). The ROS codebase is primarily C++ (roscpp) and Python (rospy), with older ROS 1 also supporting Lisp; ROS 2 retains C++/Python and adds support for newer languages (e.g. Rust) via its DDS middleware. Because of its open architecture and large community, ROS includes robust driver libraries for most sensors (OpenCV/PCL for vision, drivers for cameras/LiDAR/IMUs) and tools (RViz, rqt).核心架构:ROS 是一种分布式中间件。ROS 图由独立的节点(进程)组成,这些节点通过主题(topics)、服务(services)或动作(actions)交换消息。ROS 为硬件抽象(urdf 机器人模型、ros_control 接口)、设备驱动(摄像头、激光雷达、电机)以及通用任务的共享库提供标准支持。所有 ROS 通信均通过网络层(ROS 1 中的 TCPROS/UDPROS)或 DDS(ROS 2 中)实现。关键 ROS 概念包括参数服务器(parameter server)、roslaunch 以及庞大的软件包生态系统(每个 package 包含代码、消息定义和配置)。ROS 代码库主要采用 C++(roscpp)和 Python(rospy),较旧的 ROS 1 还支持 Lisp;ROS 2 保留 C++/Python 支持,并通过其 DDS 中间件新增了对 Rust 等现代语言的支持。得益于其开放架构和庞大社区,ROS 包含针对大多数传感器(OpenCV/PCL 用于视觉、摄像头/激光雷达/IMU 驱动)和工具(RViz、rqt)的健壮驱动库。

Figure: Simplified ROS 1 vs ROS 2 architecture. ROS 1 relies on a master node and TCPROS/UDPROS transport, whereas ROS 2 uses a masterless DDS-based middleware (with an abstract DDS layer and intra-process APIs).图:简化的 ROS 1 与 ROS 2 架构对比。ROS 1 依赖于主节点和 TCPROS/UDPROS 传输,而 ROS 2 采用无主节点的基于 DDS 的中间件(包含抽象 DDS 层和进程内 API)。

Communication: In ROS 1, the roscore master manages topic/service registration, and nodes use TCP/UDP bridges to publish or subscribe. In ROS 2, the master is removed; nodes discover each other via DDS (Data Distribution Service) and communicate directly, with optional QoS parameters (reliability, latency). DDS makes ROS 2 communications more scalable and configurable: different DDS vendors (FastDDS, CycloneDDS, etc.) can be plugged in. ROS 2’s DDS backbone inherently supports multicast and real-time tuning, enabling use cases like multi-robot or vehicle networks with reliability guarantees. For legacy fieldbus protocols, ROS relies on bridging packages: for example, there are ROS/EtherCAT interfaces (via projects like IgH EtherCAT Master) and ROS-Industrial drivers that wrap Profinet or CANopen buses.通信:在 ROS 1 中, roscore 主节点负责管理主题/服务的注册,节点通过 TCP/UDP 桥接进行发布或订阅。而在 ROS 2 中,主节点被移除;节点通过 DDS(数据分发服务)相互发现并直接通信,支持可选的 QoS 参数(可靠性、延迟等)。DDS 使 ROS 2 的通信更具可扩展性和可配置性:可插入不同的 DDS 供应商实现(如 FastDDS、CycloneDDS 等)。ROS 2 的 DDS 骨干网天然支持多播和实时调优,适用于多机器人或车辆网络等需要可靠性保障的场景。对于传统现场总线协议,ROS 依赖桥接包实现兼容:例如存在 ROS/EtherCAT 接口(通过 IgH EtherCAT Master 等项目)以及封装 Profinet 或 CANopen 总线的 ROS-Industrial 驱动。

Modularity and ecosystem: The ROS model encourages small, single-purpose nodes. Development leverages hundreds of thousands of open-source packages. For instance, the MoveIt! framework (ROS library) provides collision-aware motion planning for manipulators, using standard algorithms (OMPL, IKFast) and can target industrial arms. Similarly, perception tasks reuse OpenCV, PCL, TensorFlow, and other libraries all within ROS nodes. The ROS toolchain includes build tools (catkin/colcon), visualization (RViz), simulation (Gazebo), logging (rosbag), diagnostics, and GUIs. Because ROS is open-source, many advanced algorithms (SLAM, grasping, etc.) are available off-the-shelf. As a thesis notes, developers “can access pre-existing and thoroughly tested functionalities such as path planning algorithms or computer vision algorithms” within ROS libraries. This reuse greatly accelerates development: ROS was explicitly created to let engineers “concentrate on the development rather than the fundamental aspects common to different types of robots”, reducing redundant effort.模块化与生态系统:ROS 模型鼓励开发小型、单一功能的节点。开发过程中可利用数十万个开源软件包。例如,MoveIt!框架(ROS 库)为机械臂提供具备碰撞感知的运动规划功能,采用标准算法(OMPL、IKFast),并能适配工业机械臂。同样地,感知任务可复用 OpenCV、PCL、TensorFlow 等库,所有这些都集成在 ROS 节点中。ROS 工具链包含构建工具(catkin/colcon)、可视化工具(RViz)、仿真工具(Gazebo)、日志工具(rosbag)、诊断工具及图形界面。由于 ROS 开源特性,许多先进算法(如 SLAM、抓取等)均可直接使用。正如一篇论文所述,开发者"能在 ROS 库中直接调用经过充分测试的现有功能,如路径规划算法或计算机视觉算法"。这种复用极大加速了开发进程:ROS 的明确设计目标就是让工程师"专注于开发而非各类机器人共有的基础功能",从而减少重复劳动。

Real-time support: Out of the box, ROS 1 has no hard real-time guarantees. Its loop timings depend on Linux scheduling (or an RT patch) and cannot ensure deterministic control. Developers often isolate real-time control loops outside of ROS (e.g. using ros_control with a real-time hardware interface or running safety-critical loops on an EtherCAT master) to meet timing requirements. ROS 2 is designed for better real-time performance: its underlying DDS can be configured for real-time Linux kernels or even run on RTOS like VxWorks/QNX. In fact, the ROS‑Industrial community has developed real-time optimized executors and benchmarks (e.g. on a Raspberry Pi 4 with PREEMPT_RT). Micro-ROS, a ROS 2 variant, explicitly targets microcontrollers (FreeRTOS, Zephyr) with zero dynamic memory allocation, enabling ROS concepts on deeply embedded devices. Overall, ROS2 can approach real-time performance with careful configuration (QoS = reliable, low-latency; RT-patched Linux or bare-metal execution), whereas ROS1 is usually too unpredictable for high-end servo loops without additional real-time extensions.实时支持:ROS 1 原生不具备硬实时保证,其循环时序依赖 Linux 调度(或实时补丁),无法确保确定性控制。开发者通常将实时控制循环隔离在 ROS 外部(例如使用 ros_control 搭配实时硬件接口或在 EtherCAT 主站运行安全关键循环)以满足时序要求。ROS 2 为提升实时性能而设计:其底层 DDS 可配置为实时 Linux 内核,甚至运行在 VxWorks/QNX 等 RTOS 上。事实上,ROS-Industrial 社区已开发出实时优化执行器和基准测试(如在搭载 PREEMPT_RT 的树莓派 4 上)。Micro-ROS 作为 ROS 2 变体,明确针对微控制器(FreeRTOS、Zephyr)设计,采用零动态内存分配,使 ROS 概念能在深度嵌入式设备上实现。总体而言,通过精心配置(QoS=可靠、低延迟;实时补丁 Linux 或裸机执行),ROS2 可接近实时性能,而 ROS1 若无额外实时扩展,通常对高端伺服循环而言过于不可预测。

Applicability by Robot Class按机器人类别划分的适用性

Different project scales impose different requirements on these frameworks:不同的项目规模对这些框架提出了不同的要求:

  • Low-end robots: These are simple or hobbyist robots (e.g. small mobile bases, educational arms, or micro-robotics). Here, ROS1 is commonly used (running on Raspberry Pi or PC) because real-time performance is less critical and rapid development is valuable. For very low-power setups (e.g. robotics kits, IoT devices), micro-ROS lets even 32-bit microcontrollers participate in the ROS2 ecosystem with minimal footprint. Open-source stacks lower costs for low-budget projects; for example, fully ROS-compatible low-cost robots (like the ROMR mobile base) demonstrate that advanced software need not be expensive. The main technical barrier at this level is computing power or OS constraints; ROS2’s support for embedded Linux or RTOS and the lightweight micro-ROS client library mitigate these issues.低端机器人:这类机器人结构简单或面向爱好者(如小型移动底盘、教育机械臂或微型机器人)。通常使用 ROS1(运行于树莓派或 PC),因为实时性要求不高,而快速开发更具价值。对于极低功耗设备(如机器人套件、物联网设备),micro-ROS 甚至能让 32 位微控制器以极小资源占用接入 ROS2 生态。开源技术栈降低了低成本项目的开发门槛,例如完全兼容 ROS 的低价机器人(如 ROMR 移动底盘)证明了先进软件未必昂贵。该级别的主要技术瓶颈是算力或操作系统限制,ROS2 对嵌入式 Linux/RTOS 的支持及轻量级 micro-ROS 客户端库有效缓解了这些问题。

  • Mid-range robots: These include typical collaborative or service robots (e.g. 6-DoF arms, AGVs) found in small factories and labs. ROS/ROS2 excel here: the rich libraries (motion planning, perception) and hardware drivers speed development. Many commercial mid-range robots support ROS2 out of the box or via SDKs (for example, Universal Robots’ newer arms have ROS-Industrial interfaces). The ROS ecosystem allows integrating sensors and networks easily. If moderate real-time is needed, ROS2 on an RT kernel can often suffice (and safety-rated controllers can run critical loops separately). In practice, ROS-based systems (e.g. Locus robots, Clearpath drones) show that open platforms can meet productivity and flexibility needs in this segment. Development cycles shorten thanks to reusing ROS modules; licensing costs are low (no OS license fees), though expertise is needed to integrate ROS with CNC tooling or PLCs if required.中端机器人:这类机器人包括小型工厂和实验室中常见的协作或服务机器人(例如 6 自由度机械臂、AGV)。ROS/ROS2 在此领域表现出色:丰富的库(运动规划、感知)和硬件驱动程序加速了开发进程。许多商用中端机器人出厂即支持 ROS2 或通过 SDK 提供支持(例如 Universal Robots 的新型机械臂具备 ROS-Industrial 接口)。ROS 生态系统可轻松集成传感器和网络。若需中等实时性,运行在实时内核上的 ROS2 通常即可满足需求(安全级控制器可独立运行关键循环)。实践中,基于 ROS 的系统(如 Locus 机器人、Clearpath 无人机)证明开源平台能满足该领域生产力和灵活性需求。由于复用 ROS 模块,开发周期得以缩短;虽然需要专业知识将 ROS 与数控机床或 PLC 集成(如需),但许可成本较低(无操作系统许可费用)。

  • High-end robots: These are heavy industrial arms, aerospace robots, or any system demanding strict real-time, safety certification, and ultra-high reliability. Pure ROS1 is rarely used at the lowest control layers here, but ROS2 is making inroads. The ROS-Industrial initiative and vendors (e.g. Bosch Rexroth using Ubuntu Core) are working to integrate ROS2 into production-grade platforms. ROS2’s DDS foundations and security features (authentication, encryption) address some industrial concerns. However, high-end robots often still rely on proprietary controllers for servo loops and certified safety software; ROS/ROS2 would operate at a higher level (trajectory planning, vision, HRC coordination). For example, Universal Robots has developed a ROS‑ROS2 interface that lets external ROS2 nodes influence robot motion (Cartesian control, speed scaling) via the URScript API. Thus, ROS/ROS2 can contribute to advanced functionality in high-end systems, but meeting real-time certification standards remains a barrier without additional middleware.高端机器人:这类系统包括重型工业机械臂、航空航天机器人或任何对严格实时性、安全认证和超高可靠性有要求的设备。在这些设备的最底层控制环节,纯 ROS1 很少被采用,但 ROS2 正在逐步渗透。ROS-Industrial 项目及供应商(如采用 Ubuntu Core 的博世力士乐)正致力于将 ROS2 集成到生产级平台中。ROS2 基于 DDS 的架构和安全功能(认证、加密)解决了部分工业领域的顾虑。不过高端机器人通常仍依赖专有控制器实现伺服环路和经过认证的安全软件;ROS/ROS2 会在更高层级发挥作用(如轨迹规划、视觉识别、人机协作协调)。例如 Universal Robots 开发的 ROS-ROS2 接口,允许外部 ROS2 节点通过 URScript API 控制机器人运动(笛卡尔空间控制、速度调节)。因此 ROS/ROS2 能为高端系统提供高级功能支持,但若没有额外中间件,满足实时性认证标准仍是当前的主要障碍。

Other Open-Source Automation Architectures其他开源自动化架构

Besides ROS-family and YARP, there are specialized open architectures in industrial automation:除了 ROS 家族和 YARP 之外,工业自动化领域还存在一些专门的开源架构:

  • LinuxCNC (and MachineKit): LinuxCNC (formerly EMC2) is a real-time CNC controller stack for Linux. It implements classical G-code motion control with a trapezoidal velocity profile generator, hard real-time loops, and a HAL that lets users patch together hardware interfaces. LinuxCNC includes a software PLC (ClassicLadder) and can be extended via its HAL to any combination of interfaces (Ethernet PCI cards, FPGA boards, parallel port). The advantage is rock-solid determinism and large existing toolbase for machining. The downside is that LinuxCNC is CNC-centric (no native 3D planning or vision) and requires RT Linux for full functionality (otherwise it falls back to simulated motions). It is widely used for DIY CNC mills, 3D printers, and small manufacturing cells, but less so for flexible robotics beyond simple pick-and-place.LinuxCNC(及 MachineKit):LinuxCNC(前身为 EMC2)是一款面向 Linux 的实时 CNC 控制器套件。它采用经典的 G 代码运动控制,配备梯形速度曲线生成器、硬实时循环及可让用户灵活配置硬件接口的 HAL(硬件抽象层)。该系统内置软件 PLC(ClassicLadder),并能通过 HAL 扩展支持各类接口组合(以太网 PCI 卡、FPGA 板卡、并口)。其优势在于坚如磐石的实时确定性及丰富的现有机加工工具库,但局限性在于以 CNC 为核心(缺乏原生 3D 路径规划或视觉功能),且需搭配 RT Linux 才能发挥全部功能(否则将退化为模拟运动)。该平台广泛应用于 DIY 数控铣床、3D 打印机和小型制造单元,但在超越简单拾取放置的柔性机器人领域应用较少。

  • Orocos Real-Time Toolkit (RTT): Orocos provides a dataflow-oriented component model for real-time control. An Orocos TaskContext can run periodic, deterministic code (e.g. PID loops, kinematic solvers). For example, Orocos’ Kinematic and Dynamic Library (KDL) handles robot forward/inverse kinematics, and its iTaSC library (task-space control) can handle constraints and force control. Orocos components can be linked via signals (similar to ports) and can execute on multiple real-time threads. Unlike ROS, Orocos does not inherently provide distributed discovery or high-level planning; it is lower-level control. Its strength is that it can run on bare-metal or RTOS (no garbage-collected runtime). On the plus side, Orocos can achieve sub-millisecond jitter for servo loops. On the minus side, its community and tooling are smaller, and developers typically write more custom C++ code. The Robot Construction Kit (ROCK) extends Orocos with many ready drivers, state machines (rFSM), and deployment tools for research robots. Customers: Orocos has been used in aerospace projects, space robotics experiments, and even automotive (for example, as a controller backend in some ESA Mars projects).Orocos 实时工具包(RTT):Orocos 提供了一种面向数据流的组件模型,用于实时控制。Orocos 的 TaskContext 可以运行周期性、确定性的代码(例如 PID 循环、运动学求解器)。例如,Orocos 的运动学和动力学库(KDL)处理机器人的正向/逆向运动学,而其 iTaSC 库(任务空间控制)可以处理约束和力控制。Orocos 组件可以通过信号(类似于端口)连接,并可以在多个实时线程上执行。与 ROS 不同,Orocos 本身不提供分布式发现或高级规划;它是更底层的控制。其优势在于可以在裸机或实时操作系统(RTOS)上运行(无需垃圾回收运行时)。优点是 Orocos 可以实现亚毫秒级的伺服循环抖动。缺点是社区和工具链较小,开发者通常需要编写更多自定义 C++代码。机器人构建套件(ROCK)通过许多现成的驱动程序、状态机(rFSM)和研究机器人的部署工具扩展了 Orocos。客户:Orocos 已用于航空航天项目、空间机器人实验,甚至汽车行业(例如,在某些 ESA 火星项目中作为控制器后端)。

  • YARP: Described above, YARP’s focus is modularity rather than low-level control. It works at the same level as ROS but with a different connectivity philosophy (peer-to-peer rather than pub/sub). YARP’s advantage is light weight and flexible transport; it can achieve low latency through prioritized channels. Its ecosystem is mainly the iCub and Robotology projects; outside humanoids it is less common. YARP has good Windows support, which ROS1 lacked.YARP:如前所述,YARP 的重点在于模块化而非底层控制。它与 ROS 处于同一层级,但采用不同的连接理念(点对点而非发布/订阅)。YARP 的优势在于轻量级和灵活的传输机制;通过优先级通道可实现低延迟。其生态系统主要围绕 iCub 和 Robotology 项目;在人形机器人领域之外较为少见。YARP 对 Windows 系统有良好支持,这是 ROS1 所不具备的。

  • Others: The OMG’s RT-Middleware (OpenRTM-aist) offers a CORBA-based component model (used mainly in Japan). The SmartSoft framework (IEEE paper by Schlegel 1999) provided a component-based approach with real-time aims (but is niche). GenoM (French CNRS) was an early middleware for robotics. In CNC and PLC-land, open projects like OpenPLC (IEC 61131 engine) exist, but those are geared to ladder logic rather than robot kinematics, so we omit them for brevity.其他:OMG 的 RT-Middleware(OpenRTM-aist)提供了一个基于 CORBA 的组件模型(主要在日本使用)。SmartSoft 框架(Schlegel 1999 年的 IEEE 论文)提供了一个基于组件的实时目标方法(但较为小众)。GenoM(法国 CNRS)是早期的机器人中间件。在 CNC 和 PLC 领域,存在像 OpenPLC(IEC 61131 引擎)这样的开源项目,但这些项目更倾向于梯形逻辑而非机器人运动学,因此为简洁起见我们省略它们。

Each system’s strengths, community, and use cases vary (see next sections).每个系统的优势、社区和使用案例各不相同(参见下一节)。

Languages, Community & Use Cases语言、社区与用例

Programming languages: ROS/ROS 2 are mainly C++ and Python (roscpp/rospy); ROS2 also officially supports C, and bindings exist for Java, Lisp, and Rust. Orocos/RTT is pure C++. ROCK is largely Orocos C++. YARP is C++ (with some Python wrappers); it uses ACE libraries for Windows support. LinuxCNC is written in C and C++ (with HAL scripts in a custom language). In general, open frameworks prefer C++ for performance, with Python or scripting for high-level logic.编程语言:ROS/ROS 2 主要使用 C++和 Python(roscpp/rospy);ROS2 还官方支持 C 语言,并有 Java、Lisp 和 Rust 的绑定。Orocos/RTT 是纯 C++。ROCK 主要是 Orocos C++。YARP 是 C++(带有一些 Python 封装);它使用 ACE 库以支持 Windows。LinuxCNC 用 C 和 C++编写(HAL 脚本使用自定义语言)。总的来说,开源框架出于性能考虑偏好 C++,而高级逻辑则使用 Python 或脚本语言。

Community activity: ROS has by far the largest community. The ROS ecosystem (packages on GitHub and ROS Index) is orders of magnitude larger than any other open project. ROS conferences and the ROS-Industrial consortium engage many commercial players. Orocos and YARP communities are smaller and more academic. LinuxCNC has an active hobbyist and small-factory user base, with a forum and Debian packages. ROCK’s community centers around University of Lübeck/Chair of Information Technology (developers of RTAI, or Orocos expert Patrick Beeson’s group). Activity can be gauged by GitHub stars (ROSorg ~30k, Orocos ~400) or mailing list traffic.社区活跃度:ROS 拥有迄今为止最大的社区。ROS 生态系统(GitHub 上的软件包和 ROS 索引)比其他任何开源项目都要大几个数量级。ROS 会议和 ROS-Industrial 联盟吸引了众多商业参与者。Orocos 和 YARP 社区规模较小,更具学术性。LinuxCNC 拥有活跃的业余爱好者和小型工厂用户群,设有论坛和 Debian 软件包。ROCK 的社区主要围绕吕贝克大学/信息技术教席(RTAI 的开发者或 Orocos 专家 Patrick Beeson 的团队)。活跃度可以通过 GitHub 星标(ROSorg 约 3 万,Orocos 约 400)或邮件列表流量来衡量。

Ecosystem tools: ROS offers extensive tooling: visualizers (RViz), debuggers (rqt graph), simulators (Gazebo, Ignition), building tools (catkin/colcon), and many client libraries (navigation, perception, vision, manipulation). Orocos has tools like the RTT logger, OROCOS CB (benchmark) and Visualizer, but far fewer third-party add-ons. YARP has some integration with OpenCV and can work with MATLAB/Simulink. LinuxCNC provides GUIs (AXIS, GSE) and build tools for HAL configurations, but no higher-level planning.生态系统工具:ROS 提供广泛的工具:可视化工具(RViz)、调试器(rqt graph)、模拟器(Gazebo、Ignition)、构建工具(catkin/colcon)以及众多客户端库(导航、感知、视觉、操作)。Orocos 拥有 RTT 日志记录器、OROCOS CB(基准测试)和可视化工具等工具,但第三方插件少得多。YARP 与 OpenCV 有一定集成,并能与 MATLAB/Simulink 协同工作。LinuxCNC 为 HAL 配置提供 GUI(AXIS、GSE)和构建工具,但不支持高级规划。

Representative deployments: ROS/ROS 2 power many deployed systems: for example, ROS is used in warehouse robots (Locus, Fetch), service robots (TurtleBot-like projects), autonomous vehicles (Autoware, an ROS project), and many academic demonstrators. ROS-Industrial is deployed in factories (ABB/GM collaborative cells, BMW assembly). YARP is the backbone of the iCub humanoid and is used in RoboCup Nao teams. Orocos/ROCK has been used in satellite and Mars rovers research, visuotactile robots, and also in some prosthetics/arm simulators. LinuxCNC runs on countless CNC machines and also smaller robotic gantry systems; it’s a de facto standard for open-source CNC motion control.代表性部署:ROS/ROS 2 支持众多已部署系统,例如仓库机器人(Locus、Fetch)、服务机器人(TurtleBot 类项目)、自动驾驶车辆(Autoware,一个 ROS 项目)以及许多学术演示项目。ROS-Industrial 应用于工厂环境(ABB/GM 协作单元、宝马装配线)。YARP 是 iCub 人形机器人的核心框架,并用于 RoboCup Nao 团队。Orocos/ROCK 已被用于卫星与火星车研究、视觉触觉机器人以及部分假肢/手臂模拟器。LinuxCNC 运行于无数数控机床和小型机器人龙门系统,是开源 CNC 运动控制的事实标准。

Comparison of Architectures架构比较

Feature特性ROS / ROS 2
Orocos / ROCKYARPLinuxCNC
Languages语言C++, Python (roscpp/rospy); ROS 2 also CC++、Python(roscpp/rospy);ROS 2 也支持 CC++ (RTT, OCL)C++ (ACE-based multi-platform)C++(基于 ACE 的多平台)C/C++
Real-time实时ROS1: no hard real-time; ROS2: improved (DDS QoS, RT-kernel)ROS1: 无硬实时性;ROS2: 改进(DDS QoS,RT 内核)Yes – fully real-time control loops (Orocos RTT)是的——完全实时控制循环(Orocos RTT)Not designed for hard RT (uses OS scheduling)不适用于硬实时(使用操作系统调度)Yes – runs on RT Linux kernel (1ms thread)是的 - 运行在 RT Linux 内核上(1ms 线程)
Distributed/Scalable分布式/可扩展Highly scalable distributed graph (1000s of nodes)高度可扩展的分布式图(数千个节点)Component-based (CORBA/IDL in older versions, now simple ports) – less dynamic基于组件的(旧版本中使用 CORBA/IDL,现为简单端口)——动态性较低Peer-to-peer across nodes; supports multi-machine via network transports节点间的点对点通信;通过网络传输支持多机协作Monolithic control on single PC (no network)单台 PC 上的单体控制(无网络)
Security/Robustness安全/鲁棒性ROS1: none; ROS2: DDS security (auth, encryption) (optional)ROS1: 无; ROS2: DDS 安全(认证、加密)(可选)No built-in (left to integrator)无内置(由集成商负责)No built-in无内置N/A (single-computer, usually offline)N/A(单机,通常离线)
Industrial protocols工业协议Not built-in; uses bridges. ROS-Industrial provides EtherCAT, PROFINET, CANopen drivers非内置;使用桥接。ROS-Industrial 提供 EtherCAT、PROFINET、CANopen 驱动Can integrate EtherCAT (via RTT-SOEM); others via custom drivers可以集成 EtherCAT(通过 RTT-SOEM);其他通过自定义驱动程序No native support (can use TCP/IP and UDP)无原生支持(可使用 TCP/IP 和 UDP)Supports CAN/EtherCAT via hardware interfaces (Mesa boards), supports PLC I/O支持通过硬件接口(Mesa 板)的 CAN/EtherCAT,支持 PLC I/O
Performance (latency)性能(延迟)Moderate overhead (serialization, OS); tuning needed for <5ms loops中等开销(序列化,操作系统);需要针对<5ms 循环进行调整Very low overhead (lock-free in RTT) – suitable for sub-ms control极低开销(RTT 中无锁)——适用于亚毫秒级控制Light (no serialization by default) but not optimized for tight loops轻量级(默认不进行序列化),但未针对紧密循环进行优化Very low latency (1ms cycle typical)极低延迟(典型周期为 1ms)
Community/Ecosystem社区/生态系统Very large (200k+ pkgs, 80k devs); rich tools (MoveIt, Gazebo, etc.)规模庞大(20 万+软件包,8 万开发者);工具丰富(MoveIt、Gazebo 等)Smaller; academic/industry mostly, with robust control libs较小;学术/工业为主,具备强大的控制库Small; focused on humanoids (iCub)小型;专注于人形机器人(iCub)Niche (CNC/motion control)Niche (CNC/运动控制)
Use Cases用例Mobile robots, manipulators, research, prototyping; factory integration via ROS-I移动机器人、机械臂、研究、原型设计;通过 ROS-I 实现工厂集成High-performance servo control, research prototyping, robotics toolkits高性能伺服控制、研究原型设计、机器人工具包Humanoid robots (iCub, NAO), vision-integration rigs人形机器人(iCub、NAO),视觉集成装置CNC machines, 3D printers, motion-control rigsCNC 机床、3D 打印机、运动控制装置

Advanced Functionalities高级功能

These frameworks support implementation of key industrial tasks:这些框架支持关键工业任务的实现:

  • Motion Control: ROS uses ros_control (hardware_interface + controller_manager) to run control loops and inverse dynamics, letting users plug in PID or trajectory controllers. Orocos/RTT provides native servoloop components (TaskContexts) for joint control. LinuxCNC runs G-code executors (trapezoidal or S-curve profiles) in real time. In each case, the hardware layer (motors, drives) is abstracted: ROS relies on vendor drivers or can interface with ROS-Industrial controllers; Orocos uses HAL drivers; LinuxCNC drives straight to I/O boards. In practice, ROS controllers operate at a few kHz, Orocos can go to 1 kHz or above, and LinuxCNC commonly updates at 1 kHz (with interrupts often at 10 kHz on Mesa cards).运动控制:ROS 使用 ros_control(hardware_interface + controller_manager)运行控制循环和逆动力学,允许用户插入 PID 或轨迹控制器。Orocos/RTT 提供原生伺服环组件(TaskContexts)用于关节控制。LinuxCNC 实时运行 G 代码执行器(梯形或 S 曲线轮廓)。在每种情况下,硬件层(电机、驱动器)都被抽象化:ROS 依赖供应商驱动程序或可与 ROS-Industrial 控制器接口;Orocos 使用 HAL 驱动程序;LinuxCNC 直接驱动 I/O 板。实际上,ROS 控制器运行在几千赫兹,Orocos 可达 1 千赫兹或更高,而 LinuxCNC 通常以 1 千赫兹更新(在 Mesa 卡上中断频率通常为 10 千赫兹)。

  • Path Planning and Kinematics: ROS provides MoveIt! for collision-aware planning of robot arms, using sampling algorithms (OMPL) or deterministic planners, and uses URDF/KDL for kinematics. Example: the ROS “industrial” tutorials show how to generate a joint-space trajectory for a 6-axis arm through obstacles. Orocos has a Kinematics and Dynamics Library (KDL) for computing FK/IK and has iTaSC for task-space constraints (one can implement redundancy resolution or force control). YARP has no standard planner but can integrate similar libraries. LinuxCNC does not perform 3D planning; it executes predetermined toolpaths from CAM.路径规划与运动学:ROS 提供 MoveIt!用于机器人手臂的碰撞感知规划,采用采样算法(OMPL)或确定性规划器,并利用 URDF/KDL 处理运动学。例如:ROS 的“industrial”教程展示了如何为 6 轴机械臂生成通过障碍物的关节空间轨迹。Orocos 拥有运动学与动力学库(KDL)用于计算正/逆运动学,并通过 iTaSC 支持任务空间约束(可实现冗余解析或力控制)。YARP 无标准规划器但可集成类似库。LinuxCNC 不执行 3D 规划,仅执行来自 CAM 的预设刀具路径。

  • Perception (Vision/Sensing): ROS natively supports camera drivers, 3D scanners, force sensors, etc. Vision pipelines (image capture, OpenCV processing, object recognition) are commonplace in ROS demos. For example, a ROS node can subscribe to a camera topic and publish detected part poses for pick-and-place. Orocos does not include vision libraries, but one can call OpenCV/PCL inside an Orocos component if needed. YARP includes some image container and processing support (developed in the RobotCub context). LinuxCNC has no vision support.感知(视觉/传感):ROS 原生支持摄像头驱动、3D 扫描仪、力传感器等。视觉处理流程(图像采集、OpenCV 处理、物体识别)在 ROS 演示中十分常见。例如,一个 ROS 节点可以订阅摄像头话题并发布检测到的零件位姿用于抓取放置。Orocos 不包含视觉库,但必要时可以在 Orocos 组件内调用 OpenCV/PCL。YARP 提供部分图像容器和处理支持(在 RobotCub 项目中开发)。LinuxCNC 不具备视觉支持功能。

  • Human–Robot Collaboration (HRC): Open architectures enable HRC features by integrating safety sensors and shared workspaces. In ROS/ROS2, one can incorporate 2D/3D lidar or safety scanners and modify robot behavior via dynamic reconfigure (e.g. slow down or stop if a person is detected). The ROS-Industrial ecosystem includes packages for collision checking and monitoring (e.g. industrial_core’s safety libraries). Orocos being lower-level, one would code HRC logic externally. Generally, ROS’s flexibility eases implementing collaborative control (speed scaling, hand-guiding via UI). Human-awareness itself (gaze, gestures) is often implemented in separate modules and interfaced via ROS topics.人机协作(HRC):开源架构通过集成安全传感器和共享工作空间实现 HRC 功能。在 ROS/ROS2 中,可集成 2D/3D 激光雷达或安全扫描仪,并通过动态重配置修改机器人行为(例如检测到人员时减速或停止)。ROS-Industrial 生态系统包含碰撞检测与监控功能包(如 industrial_core 的安全库)。Orocos 作为底层框架,需通过外部编码实现 HRC 逻辑。总体而言,ROS 的灵活性便于实现协作控制(速度调节、通过 UI 进行手动引导)。人类感知功能(视线追踪、手势识别)通常由独立模块实现,并通过 ROS 话题进行交互。

Impact on Cost, Development, and Barriers对成本、开发和障碍的影响

The choice of open-source architecture significantly affects project economics and timelines:开源架构的选择显著影响项目经济性和时间表:

  • Cost-effectiveness: All the above systems are open-source (permissive or GPL licenses) and free of licensing fees. This reduces upfront costs compared to proprietary controllers. The large ROS ecosystem means existing code can be reused instead of written from scratch, shortening development time. For example, using ROS drivers for a motor or sensor avoids paying for a new library. A vibrant community and extensive documentation further lowers barriers to entry. In contrast, closed industrial platforms often require expensive software licenses and vendor lock-in. By using ROS/ROS2, small companies and research labs can afford advanced robots with modern capabilities (vision, AI) without huge budgets.成本效益:上述所有系统均为开源(宽松许可或 GPL 许可证)且免许可费。与专有控制器相比,这降低了前期成本。庞大的 ROS 生态系统意味着可以复用现有代码而非从头编写,从而缩短开发时间。例如,使用 ROS 的电机或传感器驱动可避免为新库付费。活跃的社区和丰富的文档进一步降低了入门门槛。相比之下,封闭的工业平台通常需要昂贵的软件许可和供应商锁定。通过采用 ROS/ROS2,小型企业和研究实验室无需巨额预算即可拥有具备现代功能(视觉、AI)的先进机器人。

  • Development cycle: High-level frameworks dramatically accelerate prototyping. With ROS, teams often leverage simulations (Gazebo) and modular testing before hardware trials. Code written for one robot can be transferred to another by swapping drivers (thanks to hardware abstraction). Thus mid-range projects see much faster iteration. For low-end projects (hobbyist), the abundant tutorials and community help (ROS Answers, GitHub) mean shorter learning curves. For high-end projects, using ROS2 means leveraging industrial practices (Docker/Snap packaging, real-time tuning) to meet production standards. However, for safety-critical or ultra-high-precision applications, extra validation is required; this raises the development barrier if certification (ISO 13482, IEC 61508) is needed.开发周期:高级框架显著加速原型设计。借助 ROS,团队通常在硬件试验前利用仿真(Gazebo)和模块化测试。为某款机器人编写的代码可通过更换驱动(得益于硬件抽象层)移植到另一款机器人上,因此中端项目迭代速度大幅提升。对于低端项目(爱好者),丰富的教程和社区支持(ROS Answers、GitHub)意味着更短的学习曲线。高端项目使用 ROS2 则能运用工业实践(Docker/Snap 打包、实时调优)来满足生产标准。但对于安全关键或超高精度应用,需额外验证;若需认证(ISO 13482、IEC 61508),则会提高开发门槛。

  • Technical barriers: For low-end projects, open-source tools largely remove cost and skill barriers: anyone can download ROS or LinuxCNC and start building. The challenge is ensuring adequate processing hardware (e.g. using micro-ROS for tiny controllers). For mid-range projects, ROS2’s complexity and the need to integrate with factory networks (EtherCAT, PROFINET) add barriers; however, community libraries and the ROS-Industrial initiative alleviate much of this (e.g. prebuilt EtherCAT drivers). For high-end projects, barriers remain the highest: formal verification of software and guaranteed real-time behavior are demanding. Open platforms like ROS2 are closing the gap (with real-time kernels and DDS security), but top-tier industrial robots often still rely on decades-old real-time systems under the hood. In summary, open-source architectures greatly reduce software costs and reuse effort (especially for mid- and low-end robots), but achieving industrial-grade performance and safety can still require significant engineering and validation work.技术壁垒:对于低端项目,开源工具在很大程度上消除了成本和技术门槛——任何人都可以下载 ROS 或 LinuxCNC 并开始构建。关键在于确保配备足够的处理硬件(例如在微型控制器上使用 micro-ROS)。中端项目面临 ROS2 的复杂性及与工厂网络(EtherCAT、PROFINET)集成的需求,这增加了门槛;但社区库和 ROS-Industrial 计划缓解了大部分问题(例如预置的 EtherCAT 驱动)。高端项目的壁垒依然最高:软件的形式化验证和有保障的实时行为要求严苛。虽然 ROS2 等开源平台(通过实时内核和 DDS 安全机制)正在缩小差距,但顶级工业机器人底层往往仍依赖沿用数十年的实时系统。总体而言,开源架构极大降低了软件成本和复用工作量(尤其对中低端机器人),但要实现工业级性能与安全性仍需要大量工程开发和验证工作。

Sources: All statements are supported by recent robotics literature and documentation, including analyses of ROS/ROS2 and other open frameworks.来源:所有陈述均得到近期机器人学文献和文档的支持,包括对 ROS/ROS2 及其他开源框架的分析。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值