Brief Introduction • Installation • How To Use • License • Acknowledgement
This open-source repository tackles the minimum-time flight problem of fixed-wing UAVs, exploring control methods at the velocity, actuator, and attitude levels through reinforcement learning. The related papers are currently under submission. The fixed-wing UAV model used is the Skywalker X8, with dynamics simulations carried out using JSBSim and rendering performed with Unreal Engine.
- Rendering Engine: Unreal Engine 4
- Dynamics: JSBSim (using Skywalker X8 model)
- Middleware: AirSim (The last version, v1.8.1)
- mpi4py is used for multiple processes running together.
- ZMQ is used somewhere for communication between different processes or threadings.
- Unreal Engine 5.2 can also be used, as shown in Colosseum.
- AirSim and UE are unnecessary if real-time visualization is not required.
- Anaconda virtual environment is recommended. You can create a env like this (python 3.8 is recommended!):
conda create -n sim[your env name] python=3.8
activate it:
conda activate sim
- install JSBSim and SB3 via pip
pip install jsbsim, stable-baselines3
- install AirSim via pip (version 1.8.1)
pip install numpy pandas matplotlib simple-pid colorama
pip install msgpack-rpc-python
pip install opencv-python opencv-contrib-python
pip install airsim
- install pytorch according to https://pytorch.org/.
- clone and build Unreal Engine refer to AirSim/Colosseum
- clone and build AirSim/Colosseum (please note the version)
- configure the UE project and the AirSim Plugin.
Three different learning methods: velocity-level (v1), actuator-level (v2), and attitude-level (v3).
register(id="jsbsim-uni-uav-sample-v1", entry_point="airgym.envs:JSBSim3DUniUAVEnv",)
register(id="jsbsim-uni-uav-sample-v2", entry_point="airgym.envs:JSBSim3DALCUniUAVEnv",)
register(id="jsbsim-uni-uav-sample-v3", entry_point="airgym.envs:JSBSim3DAttitudeUniUAVEnv",)
Run the training script using Pycharm or command line:
python navp2p_v1_train.py
When validation, run:
python navp2p_v1_test.py
or:
python navp2p_v1_test_multi.py
MIT
This open-source project has referenced and drawn inspiration from many other open-source projects. For the purpose of organizing the code structure and making it clearer, we did not directly fork these repositories, but instead, organized, improved, and added new features in a new repository. The code in the repository is not entirely written by us. We extend our respect and gratitude to the developers of the following open-source projects and release this project as open-source.