基于ROS系统的多机协同虚实结合系统设计与实现
Design and Implementation of a ROS-Based Multi-UAV Cooperative Virtual-Physical Integrated System
DOI: 10.12677/csa.2026.161012, PDF,    科研立项经费支持
作者: 姬路遥*, 张 蕊, 杨晓倩, 黄 月, 陈新庄#:延安大学数学与计算机科学学院,陕西 延安;范雯妍:延安大学石油工程与环境工程学院,陕西 延安
关键词: 无人机编队仿真虚实结合技术PX4飞控ROS协同控制数字孪生UAV Formation Simulation Virtual-Real Integration Technology PX4 Flight Control ROS Cooperative Control Digital Twin
摘要: 无人机(Unmanned Aerial Vehicle, UAV)集群技术在现代军事侦察、地质勘探及物流运输等领域的应用日益广泛。然而,在大规模集群系统的研发过程中,单纯依赖软件在环仿真(Software-in-the-Loop, SITL)存在模型精度不足、无法复现真实物理特性等问题,而全实物硬件在环(Hardware-in-the-Loop, HIL)测试则面临成本高昂、场地受限及安全风险大等挑战。针对上述痛点,本研究报告详细阐述了一种基于机器人操作系统(Robot Operating System, ROS)的多机协同虚实结合仿真系统。该系统创新性地融合了数字孪生技术,构建了包含多架实体无人机与多架虚拟无人机的混合编队架构。本文深入剖析了系统的分层架构设计,详细论述了利用ROS通信机制、PX4自动驾驶仪及Gazebo物理引擎实现虚实节点数据交互的关键技术。通过构建基于UDP协议的高效通信链路,系统成功实现了异构节点间的状态同步与协同控制。实验数据表明,该平台在保证仿真结果与真实飞行高度一致(实时因子k ≈ 1)的前提下,相比传统全实物测试降低了约77%的实验成本。本报告旨在为无人机集群协同控制算法的验证提供一套兼具高置信度、低成本与可扩展性的综合解决方案,并对相关理论基础、系统实现细节及性能评估进行详尽的阐述。
Abstract: Unmanned Aerial Vehicle (UAV) swarm technology is increasingly applied in modern military reconnaissance, geological exploration, logistics transportation, and other fields. However, during the development of large-scale swarm systems, reliance solely on Software-in-the-Loop (SITL) simulation faces issues such as insufficient model accuracy and the inability to reproduce real physical characteristics, while full Hardware-in-the-Loop (HIL) testing presents challenges including high costs, limited space, and significant safety risks. To address these challenges, this research report elaborates on a multi-UAV cooperative simulation system integrating virtual and real components based on the Robot Operating System (ROS). The system innovatively incorporates digital twin technology to construct a hybrid formation architecture comprising multiple physical UAVs and multiple virtual UAVs. This paper provides an in-depth analysis of the system’s layered architecture design and discusses in detail the key technologies for data interaction between virtual and real nodes using ROS communication mechanisms, the PX4 autopilot system, and the Gazebo physics engine. By establishing an efficient communication link based on the UDP protocol, the system successfully achieves state synchronization and cooperative control among heterogeneous nodes. Experimental data indicate that the platform reduces experimental costs by approximately 77% compared to traditional full physical testing while ensuring high consistency between simulation results and actual flight conditions (real-time factor k ≈ 1). This report aims to provide a comprehensive solution with high fidelity, low cost, and scalability for validating UAV swarm cooperative control algorithms, offering detailed explanations of the theoretical foundations, system implementation, and performance evaluation.
文章引用:姬路遥, 张蕊, 杨晓倩, 范雯妍, 黄月, 陈新庄. 基于ROS系统的多机协同虚实结合系统设计与实现[J]. 计算机科学与应用, 2026, 16(1): 142-153. https://doi.org/10.12677/csa.2026.161012

参考文献

[1] 李文皓, 张珩. 无人机编队飞行技术的研究现状与展望[J]. 飞行力学, 2007(1): 9-11, 18.
[2] 吕旸, 万小朋. 无人机飞行控制半物理仿真系统设计[J]. 航空工程进展, 2011, 2(4): 470-475.
[3] 王国强, 陈宇轩, 马滢滢, 等. 多无人机协同空战任务规划仿真系统[J]. 兵器装备工程学报, 2023, 44(9): 1-10.
[4] 路梦源, 王天一, 陈新昌, 等. 基于ROS和PX4的无人机编队协同飞行模型的仿真研究[J]. 智能化农业装备学报(中英文), 2023, 4(3): 32-41.
[5] 王宜腾, 杨明. 四旋翼无人机控制系统研究与仿真[J]. 工业控制计算机, 2025, 38(3): 37-39.
[6] 张俊威, 位小记, 吉彦军. 四旋翼无人机动力学模型建立与控制策略仿真验证[J]. 成才, 2024(S1): 156-158.
[7] 张栋, 王洪涛, 王孟阳, 等. 固定翼无人机集群虚实结合半实物仿真系统的设计与实现[J]. 无人系统技术, 2022, 5(5): 90-101.
[8] Quigley, M., Gerkey, B., Conley, K., et al. (2009) ROS: An Open-Source Robot Operating System.
https://api.semanticscholar.org/CorpusID:6324125
[9] Sadler, T. and Russell, K.L. (2016) Robot Operating System (ROS) and Gazebo Sensor Simulation.
https://pubs.drdc-rddc.gc.ca/BASIS/pcandid/www/engpub/DDW?W%3DSYSNUM=817229
[10] Zhang, J., Keramat, F., Yu, X., Hernández, D.M., Queralta, J.P. and Westerlund, T. (2022) Distributed Robotic Systems in the Edge-Cloud Continuum with ROS 2: A Review on Novel Architectures and Technology Readiness. 2022 Seventh International Conference on Fog and Mobile Edge Computing (FMEC), Paris, 12-15 December 2022, 1-8. [Google Scholar] [CrossRef
[11] Millan-Romera, J.A., Perez-Leon, H., Castillejo-Calle, A., Maza, I. and Ollero, A. (2019). ROS-MAGNA, a Ros-Based Framework for the Definition and Management of Multi-UAS Cooperative Missions. 2019 International Conference on Unmanned Aircraft Systems (ICUAS), Atlanta, 11-14 June 2019, 1477-1486.[CrossRef
[12] Xiao, K., Tan, S., Wang, G., An, X., Wang, X. and Wang, X. (2020) XTDrone: A Customizable Multi-Rotor UAVs Simulation Platform. 2020 4th International Conference on Robotics and Automation Sciences (ICRAS), Wuhan, 12-14 June 2020, 55-61. [Google Scholar] [CrossRef
[13] Abro, G.E.M., Abdallah, A.M., Zahid, F. and Ahmed, S. (2025) A Comprehensive Review of Next-Gen UAV Swarm Robotics: Optimisation Techniques and Control Strategies for Dynamic Environments. Intelligent Automation & Soft Computing, 40, 99-123. [Google Scholar] [CrossRef
[14] 李恒, 杨亮, 曾碧, 等. 基于ROS的移动机器人仿真实验平台设计与实现[J]. 电子设计工程, 2022, 30(14): 53-57+63.
[15] 石辅天, 王龙飞, 童鹏飞, 等. 基于AirSim的多无人机协同搜索分布式仿真研究[C]//中国科学技术大学, 中国自动化学会系统仿真专业委员会, 中国仿真学会仿真技术应用专业委员会. 第24届中国系统仿真技术及其应用学术年会论文集. 2023: 47-53.
[16] 张佳楠, 胡钊政, 孟杰, 等. 面向车-路-图协同的分布式自动驾驶仿真平台架构及应用[J]. 汽车工程, 2024, 46(8): 1335-1345+1356.
[17] 曾旭. 基于分布式架构的无人机编队协同控制技术研究[D]: [硕士学位论文]. 南京: 南京航空航天大学, 2021.
[18] 李实吉, 胡谷雨, 丁有伟. 微型无人机集群低时延组网规划方法[J]. 控制与决策, 2020, 35(11): 2696-2706.
[19] 刘智搏. 异构多无人机协同任务规划方法研究[D]: [硕士学位论文]. 西安: 西安电子科技大学, 2024.