Frequently Asked Questions (FAQ)¶
Installation, Upgrade, and Environment Configuration¶
What should I do if the installation prompts that WSL is not enabled?
Please run the installation package 0.UbuntuWSL\EnableWSL.bat, enter Y as prompted, and restart your computer. After restarting, run the script again to confirm WSL is enabled.
If it still fails, go to Control Panel → Programs and Features → Turn Windows features on or off, and manually check "Windows Subsystem for Linux" and "Virtual Machine Platform".

The RflyTools folder does not appear on the desktop after installation?
Please confirm that the installation script has completed execution and was not interrupted early. You can re-run the one-click installation script and select "Yes" to reinstall.
Antivirus software deleted files of RflySim?
RflySim is a portable (green) software that does not modify system files or access external networks. Please completely disable all antivirus software (including Windows Defender real-time protection) before installation, then reinstall.
How much disk space is required for installation?
A full installation requires approximately 80–100GB; it is recommended to install to a solid-state drive.
During RflySim installation, a file permission error is displayed. How can I resolve this?
This issue is caused by file permission problems in the current installation package. Close MATLAB, then reopen it as an administrator and retry the installation.

During installation of the latest RflySim version, an installation path error is displayed. How can I resolve this?
The installation path must be set to a specific folder; using only a drive letter (e.g., D:\) as the installation path is not allowed.

Can I directly download and install the new version for an upgrade? Is uninstalling the old version required?
Both approaches are supported. You can directly run OnekeyScript.p or OnekeyScript.exe and select "Full Installation" in the pop-up interface; alternatively, you may uninstall the old version first and then install the new one.
Can the RflySim toolchain be installed on external USB drives or other portable storage devices connected to a Windows computer for use across multiple machines?
No. As a toolchain, RflySim includes multiple software components and modules. Installing it on portable storage devices may cause internal link errors among components, potentially leading to abnormal behavior—even when used on a single machine—resulting in failure to run properly.
How can I view the current configuration parameters of the RflySim toolchain?
After installation, you can check the version by opening CopterSim, RflySim3D, or the *.txt files located in the installation directory.

RflySim memory usage keeps increasing over time. How can I resolve this?
The RflySim toolchain does generate some cache files during use. Solutions include:
- Delete cache files: Delete the
*\RflySimAPIs_Backup_****folder, which is a backup of theRflySimAPIsfolder created during RflySim updates. If no important files exist, it can be safely deleted. Additionally, clear the PX4 system cache: multiple runs of SITL/HITL simulations generate many log and other files. To clear them, runmake distcleandirectly in*\Desktop\RflyTools\WinWSL.lnk. - Move RflySim to another drive with more space: Run
uninstall.mto completely uninstall the current RflySim toolchain, then reinstall it on another drive. It is recommended that the target drive have at least 300GB of free space. - Expand the current drive’s capacity: Use tools such as DiskGenius to expand the current drive’s capacity. It is recommended to expand to at least 300GB.

Simulation Execution, Display, and Ground Station¶
RflySim3D does not display the drone after SITL starts?
- Check whether CopterSim started normally and whether data is updating in the status bar.
- Check whether there is a
*** EKFstatus prompt in the upper-left corner of RflySim3D. - Confirm that antivirus software is disabled and the firewall does not block UDP communication.
- Try running in low-precision mode with
SITLRunLowGPU.
The aircraft keeps shaking during simulation?
This is usually caused by insufficient GPU performance leading to low rendering frame rate. Solutions:
- Use the low GPU configuration mode
SITLRunLowGPU. - Reduce the resolution and rendering quality of RflySim3D.
- Close other programs that occupy GPU resources.
HITL simulation cannot connect to Pixhawk?
- Confirm that the USB cable is connected firmly, and the COM port can be seen in Device Manager.
- Confirm that you entered the correct COM port number and baud rate.
- Close QGroundControl or other programs that may occupy the serial port.
- Try replacing the USB port or data cable.
Only the first aircraft can take off in multi-aircraft simulation?
Check whether the Vehicle ID of each vehicle is unique, and whether the ports of each PX4 instance have conflicts.
QGC ground station cannot be opened, but its icon appears in the system tray. How can I resolve this?
This is a common issue with the QGC software itself. Double-click the window preview in the lower-right corner of the taskbar to restore display. Another similar issue is that QGC’s map fails to display even though the computer is connected to the internet. In this case, close any related VPNs and antivirus software, restart the computer, and check whether normal operation resumes.

FlightGear 2016.1.2 software issues?
Frequently Asked Questions (FAQ)¶
Installation Issues¶
What should I do if the installation prompts that WSL is not enabled?
Please run the installation script 0.UbuntuWSL\EnableWSL.bat, enter Y as prompted and restart your computer. After restarting, run the script again to confirm WSL is enabled.
If it still fails, go to Control Panel → Programs and Features → Turn Windows features on or off, and manually check "Windows Subsystem for Linux" and "Virtual Machine Platform".
The RflyTools folder does not appear on the desktop after installation?
Please confirm that the installation script has completed execution and was not interrupted early. You can re-run the one-click installation script and select "Yes" to reinstall.
Antivirus software deleted files of RflySim?
RflySim is a green software that does not modify system files or access external networks. Please completely disable all antivirus software (including real-time protection of Windows Defender) before installation, then reinstall.
How much disk space is required for installation?
A full installation requires approximately 80-100GB, it is recommended to install to a solid-state drive.
Simulation Issues¶
RflySim3D does not display the drone after SITL starts?
- Check if CopterSim started normally and there is data updating in the status bar
- Check if there is a
*** EKFstatus prompt in the upper left corner of RflySim3D - Confirm that antivirus software is disabled, and the firewall does not block UDP communication
- Try running in low-precision mode with
SITLRunLowGPU
The aircraft keeps shaking during simulation?
This is usually caused by insufficient GPU performance leading to low rendering frame rate. Solutions:
- Use the low GPU configuration mode
SITLRunLowGPU - Reduce the resolution and rendering quality of RflySim3D
- Close other programs that occupy GPU resources
HITL simulation cannot connect to Pixhawk?
- Confirm that the USB cable is connected firmly, and the COM port can be seen in Device Manager
- Confirm that you entered the correct COM port number and baud rate
- Close QGroundControl or other programs that may occupy the serial port
- Try replacing the USB port or data cable
Only the first aircraft can take off in multi-aircraft simulation?
Check whether the Vehicle ID of each vehicle is unique, and whether the ports of each PX4 instance have conflicts.
Development Issues¶
Python script cannot import RflySimSDK?
- Confirm that you are using the Python environment that comes with RflySim (
Python38\python.exe) - If you use a custom environment, run
RflySimSDK\ReLabPath.pyfirst to register the path - Check for missing dependency packages, and run
pip installas prompted
Simulink code generation failed?
- Confirm that your MATLAB version ≥ R2022b
- Confirm that you have installed Simulink Coder and Embedded Coder
- Check whether the model uses modules that do not support code generation
ROS node cannot connect to PX4 SITL?
- Confirm that the
fcu_urlparameter of MAVROS is correct - Check the network mode of WSL (WSL1 shares the network stack, WSL2 requires port mapping)
- Confirm that PX4 SITL has started normally
Others¶
How do I get technical support?
- Email: service@rflysim.com
- GitHub Issues: github.com/RflySim/Docs/issues
- QQ Technical Discussion Group: See the installation document for details
Is RflySim open source?
The Python SDK and some example routines of the RflySim toolchain are open source. The core simulation software (CopterSim, RflySim3D) is closed-source and free to use.
FlightGear and Visual Communication¶
How to use the FlightGear alternative?
FlightGear 2016.1.2 has inferior rendering quality compared to the currently built-in RflySim3D software. We recommend using the already packaged RflySim3D communication module instead. If FlightGear must be used, download it from https://pan.baidu.com/s/voBFTUMzohBVFj5__amdZg?pwd=2g1x, then extract 4.HILApps\FlightGear 2016.1.2.zip into the installation directory (default C:\PX4PSP) and run FlightGear-F450.bat to start it. For related usage instructions, please refer to: [RflySim安装路径]\RflySimAPIs\2.RflySimUsage\1.BasicExps\e10_Firmware-Upload.

How to use the FlightGear suite?
FlightGear 2016.1.2 is a ground station software specifically designed for Pixhawk flight controllers. For detailed usage instructions, please refer to: [RflySim安装路径]\RflySimAPIs\2.RflySimUsage\1.BasicExps\e10_Firmware-Upload.
Does the visual image transmission example support transmitting images from Windows to the rk3588 onboard computer (Ubuntu 20.04) over a local area network?
The RflySim toolchain includes a built-in WSL subsystem, which can be used directly as a Linux virtual machine. During pure software-in-the-loop (SITL) simulation, the image transmission method can be changed to UDP, enabling image transmission from Windows to the virtual machine (WSL) environment. During hardware-in-the-loop (HITL) simulation with an onboard computer, the same method can be used to transmit images directly over the local area network to the onboard board. Additionally, if two devices can be pinged successfully but image data is not received, please check whether the Windows background firewall is blocking the traffic.
Development Environment, SDK, and ROS¶
Python environment cannot import RflySimSDK?
- Confirm that you are using the Python environment bundled with RflySim (
Python38\python.exe). - If using a custom environment, first run
RflySimSDK\ReLabPath.pyto register the path. - Check for missing dependency packages and execute
pip installas prompted.
For more detailed environment configuration instructions, please refer to: [RflySim安装路径]\RflySimAPIs\1.RflySimIntro\2.AdvExps\e3.PythonConfig.
Simulink code generation failed?
- Confirm that your MATLAB version ≥
R2022b. - Confirm that
Simulink CoderandEmbedded Coderare installed. - Check whether the model uses modules that do not support code generation.
If the issue is related to the Simulink compilation environment, Visual Studio configuration, or interface switching, please refer to: [RflySim安装路径]\RflySimAPIs\5.RflySimFlyCtrl\0.ApiExps\13.Simulink_MS_FuncVS and [RflySim安装路径]\RflySimAPIs\5.RflySimFlyCtrl\0.ApiExps\21.SwitchPX4Simulink.
How to choose and configure ROS 1 / ROS 2?
The RflySim toolchain provides comprehensive support for both ROS 1 and ROS 2. Generally:
- If you are primarily using MAVROS, legacy workflows, or existing ROS 1 projects, ROS 1 is recommended.
- If you require more modern communication mechanisms, shared memory, or future system scalability, ROS 2 is recommended.
Relevant tutorials and configuration examples are available:
- ROS 1 Installation: [RflySim安装路径]\RflySimAPIs\2.RflySimUsage\0.ApiExps\e8_RosInstall
- ROS 2 Installation: [[RflySim安装路径]\RflySimAPIs\2.RflySimUsage\0.ApiEx
- Confirm that the
fcu_urlparameter of MAVROS is correct. - Check the WSL network mode:
WSL1shares the network stack, whileWSL2generally requires additional port mapping configuration. - Confirm that PX4 SITL has started normally.
If you need to troubleshoot by referring to existing examples, please consult: [RflySim Installation Path]\RflySimAPIs\2.RflySimUsage\0.ApiExps\e10_Mavros and [RflySim Installation Path]\RflySimAPIs\5.RflySimFlyCtrl\0.ApiExps\18.MavrosCommAPI.
Flight Controller Interface, Communication, and Hardware-in-the-Loop (HIL)¶
DShot Protocol: How to read motor RPM using DShot in PX4?
DShot (Digital Shot) is a digital communication protocol used between the flight controller and electronic speed controllers (ESCs). Before implementation, ensure that both software and hardware meet the requirements for bidirectional DShot:
Flight Controller: Must support DShot output. For Pixhawk-series flight controllers, only the FMU port (Aux port or Main port on integrated boards) typically supports DShot, while ports output via the IO co-processor generally do not.
Electronic Speed Controllers (ESCs):
- 32-bit ESCs (
BLHeli_32): Natively support bidirectional DShot. - 8-bit ESCs (
BLHeli_S): Do not support bidirectional DShot in factory firmware; third-party firmware (e.g.,BluejayorAM32) must be flashed to enable bidirectional DShot.
Hardware Connection: No additional telemetry line (UART) is required—only the standard signal line (Signal) and ground (GND) are needed.
Specific Steps:
- ESC Firmware Preparation:
- For
BLHeli_32ESCs, bidirectional DShot is usually enabled by default. Connect usingBLHeliSuite32and confirm that theBidirectionaloption is enabled. - For
BLHeli_SESCs, useESC-Configuratorto flashBluejayfirmware; it is recommended to select a PWM frequency of48kHzor96kHz. After flashing, enableBidirectional DShotin the settings page. - PX4 Parameter Configuration: Enable DShot output, set the motor pole count, and enable DShot telemetry.
- After configuration, power cycle both the flight controller and ESCs before verification.
Firmware Integration: How to use MAVLink and MAVSDK?
The RflySim toolchain integrates multiple PX4 firmware interfaces and advanced control channels. Selection typically follows these guidelines:
- For position, velocity, or attitude control using
MAVLink/Offboard, refer to: [RflySim Installation Path]\RflySimAPIs\5.RflySimFlyCtrl\0.ApiExps\17.OffboardCtrlsAPI - For MAVROS/ROS communication links, refer to: [RflySim Installation Path]\RflySimAPIs\5.RflySimFlyCtrl\0.ApiExps\18.MavrosCommAPI and [RflySim Installation Path]\RflySimAPIs\6.RflySimExtCtrl\0.ApiExps\e18_MavrosExps
- For model-level control or DLL interfaces, refer to: [RflySim Installation Path]\RflySimAPIs\4.RflySimModel\0.ApiExps\12.DllModelImport
From a modular perspective, the toolchain primarily encompasses the following areas: low-level control, model control, vision-based control, attitude and navigation control, and swarm control.
Model Control: How to use HIL16CtrlsNorm / HIL16CtrlsPWM?
These two model control interfaces are designed for different scenarios:
HIL16CtrlsNorm: A standardized model control interface suitable for most control scenarios. By default, it uses Offboard mode to provide stable position, velocity, and attitude control.
HIL16CtrlsPWM: A PWM direct control interface suitable for high-performance or direct motor control scenarios. It outputs PWM signals and offers faster response.
What is the data structure of UDP_FULL mode?
The communication mode used in this example is UDP_FULL mode, whose data structure is shown in the lower-right figure. Therefore, before starting HITL simulation, ensure that the UDPSIMMODE variable in the .bat script is set to UDP_FULL mode, i.e., UDPSIMMODE=0.

After auto-generated code is flashed to the flight controller, HIL or real-flight simulation fails to arm. How to resolve this?
This issue is relatively complex, as it involves HIL or real-flight simulation and is highly dependent on software and hardware configurations. It is recommended to troubleshoot in the following order:
- First, refer to the low-level control development workflow documentation: [RflySim Installation Path]\RflySimAPIs\5.RflySimFlyCtrl\2.AdvExps\e0_DevWorkflow\1.Low-level_Controller_Dev to verify whether the current development and deployment workflow itself is correct.
- Check whether the hardware can first complete basic HIL simulation or real-flight validation under the official firmware. For HIL basic validation, refer to: [RflySim Installation Path]\RflySimAPIs\1.RflySimIntro\2.AdvExps\e2.FCUIntro.
- Finally, confirm that all hardware connections and statuses are normal—for example, whether the USB cable is the official standard model, whether the remote controller channel settings are correct, and whether the flight controller and ESC connection ports on the actual aircraft are correctly configured.
Can some hardware-in-the-loop (HIL) examples in the book Design and Practice of Micro-UAV Flight Control be used for real-flight missions?
Some experiments can indeed be applied to real-flight missions; however, note that the actuator output section must be modified according to the actuator channels of your specific drone. You may use modules such as AUX_output or PWM_output for replacement. Additionally, fixed-wing flight experiments are generally more challenging than multi-rotor ones; it is recommended to conduct test flights only with professional personnel involved.

How is firmware compatibility achieved? How can multiple hardware components be integrated?
The RflySim toolchain integrates various types of PX4 firmware interfaces and development entry points, including:
- Low-level data acquisition: ADC, serial communication.
- Actuator outputs: PWM, AUX, auxiliary outputs.
- Sensor management: RGB_LED, battery measurement, input/output.
- Various control modules: attitude control, navigation, mission management, etc.
If you wish to continue exploring from the custom flight controller experiment entry point, refer to: [RflySim Installation Path]\RflySimAPIs\5.RflySimFlyCtrl\3.CustExps.
Control, Modeling, and Intelligent Algorithms¶
Can RflySim implement attitude control based on reinforcement learning?
Yes. RflySim already provides reinforcement learning–based flight control design experiments—not only is it feasible, but the toolchain also includes ready-to-use examples for direct reference.
The most straightforward experiment example is: [RflySim Installation Path]\RflySimAPIs\5.RflySimFlyCtrl\3.CustExps\e2_RL-CtrlExp, titled “Reinforcement Learning–Based Optimal Control Flight Control Design Experiment.” This directory includes both SITL\RL_SITL.slx and HITL_FLY\RL_HITL_FLY.slx, enabling software-in-the-loop and hardware-in-the-loop validation, respectively.
If you prefer training on an external simulation platform and then returning to RflySim for validation, you may refer to: [RflySim Installation Path]\RflySimAPIs\6.RflySimExtCtrl\2.AdvExps\e6.IsaacSimExps. This experiment directory contains files such as RL_attctrl\rl.py and circle_follow.py, which can be used to reference reinforcement learning–based attitude control workflows.
Furthermore, if you wish to bypass 3D rendering and directly leverage high-fidelity dynamic models for training, you may combine the DLL comprehensive model interface for reinforcement learning training; refer to: [RflySim Installation Path]\RflySimAPIs\4.RflySimModel\0.ApiExps\12.DllModelImport.
In some of the Simulink models provided in RflySim, most examples are trajectory-based control. Are there methods that use velocity control in the X and Y directions and altitude (position) control in the Z direction?
Yes. It is recommended to directly use the Offboard position-velocity-acceleration hybrid control interface, specifically OffboardPvaCtrlAPI, corresponding to: [RflySim Installation Path]\RflySimAPIs\5.RflySimFlyCtrl\0.ApiExps\17.OffboardCtrlsAPI.
This interface supports simultaneous input of 11 control quantities: position, velocity, acceleration, yaw angle, and yaw rate, with individual channel enablement. Therefore, you can configure:
XandYdirections for velocity control.Zdirection for position (i.e., altitude) control.- Unused channels set to
NaN, with corresponding enable bits disabled inEnList.
For example, in the NED coordinate system, you may adopt a hybrid mode where x/y use Vx/Vy and z uses position. Note that in the NED system, altitude increases downward; thus, when the drone flies above ground, z is typically negative—this must be carefully considered.
If using the Python interface, you may also refer to the SendOffAll() / PosTypeMask combination in PX4MavCtrlV4 to achieve the same hybrid-dimensional control. For ready-made examples, first refer to the velocity control experiment: [RflySim Installation Path]\RflySimAPIs\6.RflySimExtCtrl\1.BasicExps\e2_VelCtrl, and then extend it using the hybrid control interface from OffboardCtrlsAPI.
In SLAM positioning experiments, why is there no GPS signal?
SLAM (Simultaneous Localization and Mapping) positioning experiments typically do not use GPS signals, as GPS signals are easily obstructed and lack sufficient accuracy in indoor environments. SLAM emphasizes autonomous localization and mapping capabilities based on sensors such as LiDAR, cameras, and IMUs. In these experiments, SLAM relies on these sensors to acquire environmental information, achieving high-precision localization and map construction—thereby eliminating external dependency on GPS.
In outdoor scenarios, GPS/SLAM fusion or RTK-GPS can be employed to compensate for GPS limitations; however, the core advantage of SLAM remains its robustness and accuracy in GPS-denied environments.
Additional Information and Support¶
How do I get technical support?
- Email: service@rflysim.com
- QQ Technical Discussion Group:

- WeChat Technical Discussion Group:

Is RflySim open source?
The Python SDK and some example code of the RflySim toolchain are open source. The core simulation software (CopterSim, RflySim3D) is closed-source but free to use.