RflySim:A Toolchain For The Development, Testing, And Evaluation Of An Unmanned Aerial System (UAS) Based On PX4

Platform Background

Developing and testing intelligent unmanned systems typically involve two approaches: experiment-based and simulation-based. Taking drone development as an example, experiment-based development and testing are direct but come with several pain points, including safety, space, time, and cost, which are even more challenging for cluster flight testing. Simulation-based development and testing require the creation of mathematical models for unmanned systems, with development and testing centered around these models, ultimately transitioning to real unmanned systems. The challenge in simulation-based development and testing lies in establishing realistic models, as traditional simulations may not be true to life, yet creating highly accurate models can be expensive.

However, it’s important to note that while experiment-based development and testing offer more immediate results, they can be considered short-term gains. On the other hand, simulation-based development and testing may seem more complex, but they tend to yield long-term benefits. For instance, Tesla engineers mentioned that they spent ten years building a model for energy flow, which led to an increase in range without replacing the battery pack.

What’s RflySim?

RflySim is an ecosystem or toolchain released by Beihang University’s Reliable Flight Control Group. It is under the guidance of QuanQuan professor and was initially developed by Dr. Dai Xunhua. Later, it was taken over and further advanced by the FeiSi Lab under the umbrella of Zhuoyi Intelligent. RflySim is designed as a highly reliable platform for the development, testing, and evaluation of unmanned control systems in cutting-edge research areas such as unmanned platform control, large-scale cluster cooperation, artificial intelligence vision, and more.

This platform adopts a model-based design philosophy (MBD) and is based on technologies like Pixhawk/PX4, MATLAB/Simulink, ROS, and off-the-shelf intelligent hardware. It can be used for various applications, including but not limited to simulating and testing unmanned intelligent agent control, simulating and testing unmanned intelligent agent cluster behavior, and simulating and testing based on the vision of unmanned intelligent agents.

In the research context mentioned above, activities such as modeling unmanned systems, designing controllers, software-in-the-loop (SITL) simulation, and hardware-in-the-loop (HITL) simulation can be carried out. By utilizing MATLAB/Simulink’s automatic code generation capabilities, controllers can be easily downloaded into hardware for HIL simulation and real-flight testing, achieving the concept of “Sim2Real.”

Compare & Features

Compared to other platforms, RflySim offers the following distinctive features:

  • Uniformity : The entire research framework extends to all unmanned control systems, forming a standard automated development, testing, and evaluation framework system.

  • High-fidelity simulation of unmanned aerial vehicle (UAV) physical characteristics: RflySim provides a highly realistic simulation of the physical characteristics of UAVs. Its developers are experts in the field of UAV research, possessing extensive experience in UAV-related studies.

  • User-friendliness: RflySim is user-friendly and offers one-click installation, one-click code generation, one-click firmware deployment, one-click software and hardware-in-the-loop simulation, and quick real-world flight testing, all on the Windows platform. It is extremely convenient to use. Users do not need to have a deep understanding of flight control source code, Linux programming, C/C++ programming, network communication, or aircraft assembly, as the platform simplifies these complexities. Basic knowledge of Simulink (or Python) is sufficient, enabling users to swiftly validate their algorithms and apply them to actual UAVs. This allows users to focus more on algorithm development and testing.|

  • Fully Distributed Architecture: All application software can run concurrently on the same or multiple computers, and various applications can exchange messages with each other through UDP networking. This distributed architecture is particularly well-suited for large-scale vision-based drone cluster simulation testing.

  • Support for Multiple Vehicle Models: RflySim supports various types of vehicles, including ground vehicles, fixed-wing aircraft, and vertical take-off and landing (VTOL) aircraft. Users can construct frame models in Simulink based on standard interfaces and then automatically generate DLL files for hardware-in-the-loop (HIL) simulation. This extensibility allows the experimental platform to be adapted for use with a wide range of unmanned systems.

  • Support for Drone Cluster Simulation: Within the same local area network, developers can use CopterSim to connect multiple Pixhawk units for hardware or software-in-the-loop simulation. Simultaneously, they can control the aircraft using Simulink or C++ programs, with control commands transmitted to the Pixhawk via the Mavlink protocol through serial (telemetry) or network (WIFI) communication.

  • Highly Realistic 3D Scenery: RflySim provides source code and tutorials to help developers create highly realistic 3D environments within Unreal Engine (UE). These environments can be used for indoor and outdoor simulations or for the development of vision-based algorithms. The scenes support physics collision engines, global terrain and maps, OSGB+Cesium terrain map import with oblique photography views, custom GPS coordinates, multi-window switching for observation, output of sensor data such as RGB, depth, grayscale, IMU, LiDAR, and more. It also supports shared memory or UDP image transmission to specific IP addresses, making it suitable for hardware-in-the-loop SLAM simulation on onboard computers.
    Different 3D Scene Simulations

  • Support for Vision-Based Control: The 3D scenery platform based on UE also supports perspective switching, allowing you to easily access image data from multiple perspectives. It further supports real-time acquisition of image data through shared memory in platforms like Simulink, Python, C/C++, and more. Processed visual data can be sent back to CopterSim or Simulink through UDP, creating a closed-loop hardware-in-the-loop simulation enriched with visual feedback.

  • Support for Various Fault Injection: RflySim provides support for injecting multiple types of faults, including model faults, communication faults, and environmental faults. This feature allows for the simulation of different fault scenarios, helping to test the resilience and fault tolerance of unmanned control systems.

For more detailed information, please visit https://doc.rflysim.com . The basic and advanced trial versions of RflySim can be obtained by providing your email address through the download link at https://rflysim.com/download . For the full-featured complete version, please inquire at service@rflysim.com