Toolchain Protocol Summary

The above figure illustrates the typical data flow interactions between the motion simulation module and various external interfaces within the RflySim platform, covering autopilot software/hardware-in-the-loop modules, the 3D simulation engine, controller and sensor feedback paths, etc. To support this interactive architecture, RflySim defines a series of standardized protocols, including control command transmission, sensor data feedback, configuration and driver execution, log recording, etc. The following table summarizes these foundational protocols along with their applicable platforms and core functionalities.
| Protocol Name |
Target Platform or Module |
Functional Description |
| [UDP/TCP Communication Ports] |
RflySim Main Program, Control Module, Feedback Module |
Uniformly specifies the port number range used for simulation communication; typically allocated internally by the RflySim main program (e.g., CopterSim), with port configurations exposed to upper-layer controllers and other external programs detailed in the port field of corresponding interfaces. |
| [UDP Control Command Protocol] |
Simulink, Python Controllers |
Real-time transmission of control commands (e.g., desired attitude, velocity, trajectory points), supporting multi-vehicle broadcast or single-vehicle control. |
| [UDP Sensor Feedback Protocol] |
Python/ROS Clients |
Real-time feedback of simulated IMU, GPS, image, and other sensor data. |
| [Automated Simulation Configuration Protocol] |
RflySim Main Program Configuration Generation / Command Generation |
Standardized structured format for task and simulation scenario configuration, supporting one-click startup and batch experiment automation. |
| [Log Recording Protocol] |
Simulation Data Logging System |
Structured logging of flight states, sensor data, and control commands with timestamps, supporting export to formats such as CSV. |
RflySim supports integration with multiple mainstream unmanned system platforms and their communication middleware, including the PX4 flight controller, Robot Operating System ROS1/ROS2, and motion capture systems such as VRPN. These protocols provide foundational support for seamless interoperability between systems and serve as critical bridges for system integration and hardware-software co-debugging.
| Protocol Name |
Applicable Platforms |
Functional Description |
| [MAVLink] |
PX4, ArduPilot, QGroundControl |
Lightweight flight controller communication protocol supporting position/attitude/state transmission and control command delivery. |
| [VRPN (Virtual-Reality Peripheral Network)] |
Motion Capture Systems (e.g., OptiTrack, NOKOV) |
Provides stable 6DoF pose transmission, supporting subscription and closed-loop control on platforms such as MATLAB and Simulink. |
| [ROS Topic / Service / Action] |
ROS1, ROS2 |
Publish-subscribe messaging, service invocation, and behavior tree decision-making mechanisms, enabling end-to-end integration from perception to decision-making to control. |
| [DDS (Data Distribution Service)] |
ROS2 (Foxy/Galactic, etc.) |
High-performance real-time communication middleware supporting reliable, low-latency transmission across multiple nodes. |
III. Network Communication and Grouping Protocols (For Unmanned System Swarm Control Development)
In multi-vehicle swarm control and distributed cooperative research, network communication efficiency and protocol flexibility are crucial. This section compiles the mainstream communication protocols supported by the RflySim platform, including Redis, MQTT, NS-3, as well as the platform’s custom coarse-grained network topology simulation mechanisms.
| Protocol Name |
Primary Use Case |
Functional Description |
| Custom Grouping Communication |
Multi-vehicle formation, heterogeneous system joint control |
Implements information exchange among controllers via UDP broadcast/unicast combined with custom message structures. |
| [MQTT] |
Multi-vehicle communication in cloud/edge low-bandwidth environments |
Topic-based publish-subscribe mechanism supporting QoS control and reconnection upon disconnection. |
| Redis Publish-Subscribe |
Efficient multi-vehicle state broadcasting and command synchronization within LAN |
Key-value storage combined with channel subscription mechanism, offering low latency and simple structure, suitable for rapid prototyping experiments. |
| [Custom Coarse-Grained Grouping Simulation] |
Communication strategy validation and latency testing |
Constructs simplified network topologies and communication strategies to test robustness against packet loss and delay. |
| [NS-3 Protocol Stack Simulation] |
Network behavior modeling within simulated swarms |
Enables construction of TCP/IP, UDP, 802.11, and other network protocol models for communication behavior testing. |
IV. User Guidance
Different types of developers interact with distinct interface modules when using RflySim. This section categorizes typical users—control algorithm developers, perception and decision-making developers, and swarm & networking researchers—based on their usage objectives, and recommends suitable interfaces and implementation pathways to facilitate efficient integration and rapid validation.
1. Control Algorithm Developers (Implementing Flight Control via Simulink / Python)
| Application Objective |
Example Interfaces |
| Command下发 (Command Transmission) |
Implement control logic in Simulink / Python and send commands to the simulation platform via UDP |
| Flight State & Sensor Data Reception |
Listen on return ports (e.g., 14550/14600) to receive real-time data streams such as /imu, /gps, /odom |
| Integration with Real Flight Controllers / Hardware-in-the-Loop |
Connect to PX4 via QGroundControl and leverage MAVLink to unify simulation and physical hardware control workflows |
2. Perception & Decision Module Developers (Using Python + ROS1 / ROS2)
| Application Objective |
Example Interfaces |
| Perception Data Publishing/Subscribing (Images, IMU) |
Use VisionCaptureApi.py to publish simulated image/IMU data as ROS Topics for tasks like YOLO detection or SLAM |
| Control Command Feedback |
Subscribe to perception results, generate control commands based on decision strategies, and feed them back to the simulation platform via UDP/MAVLink interfaces |
3. Unmanned Swarm Control & Networking Researchers
| Application Objective |
Example Interfaces |
| Multi-UAV Information Synchronization / Command Broadcasting (Networking Communication) |
Use Redis/MQTT to share target states and path information across multiple nodes, ensuring swarm consistency |
| Protocol Behavior Validation in Simulation Environment (Networking Simulation) |
Use NS-3 to simulate channel loss, bandwidth constraints, and interference, evaluating the impact of communication mechanisms on swarm mission execution |
| Multi-UAV Collaborative Planning / Scheduling (Centralized / Decentralized Control) |
Leverage custom networking communication interfaces in Python to implement centralized schedulers or local collaborative strategies |
Appendix: Typical Workflow Templates