Recent advancements in Unmanned Aerial Vehicle (UAV) physics simulators, flight control firmware, and network virtualization have been substantial. However, operating these systems independently fails to capture the complex dynamics of real-world multi-UAV networks, thereby compromising simulation reliability. To address this, we propose the Multi-UAV Network-in-the-Loop Simulation (MUNILS) platform, which seamlessly integrates the Gazebo physics engine, the PX4 flight controller, and the ns-3 network simulator via Robot Operating System 2 (ROS2) middleware. Specifically, MUNILS leverages Micro eXtremely Resource Constrained Environments–Data Distribution Service (XRCE-DDS) for high-speed data bridging and employs Linux network namespaces to enforce traffic isolation and routing exclusively through ns-3. Crucially, we introduce a precise cross-layer time synchronization mechanism spanning the physical, control, and network domains to resolve inherent clock discrepancies among these heterogeneous simulators. Experimental evaluations confirm that MUNILS achieves strict traffic isolation, scalable closed-loop flight control, and highly accurate time synchronization across all integrated modules (Gazebo, ns-3, ROS2, and PX4) without cumulative clock drift, thereby providing a highly reliable verification environment for large-scale swarm operations on a single machine.
Lee et al. (Mon,) studied this question.