Skip to content

yanjiarun/OpenFlight

 
 

Repository files navigation

OpenFlight

Less is more.

Brief IntroductionInstallationHow To UseLicenseAcknowledgement

Brief Introduction

1. Key components:

  • Rendering Engine: Unreal Engine 4
  • Dynamics: JSBSim (using Skywalker X8 model)
  • Middleware: AirSim (The last version, v1.8.1)

2. Multiple UAVs supported!

  • 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.

3. Others

  • AirSim and UE are unnecessary if real-time visualization is not required.

Installation

  • 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.

How To Use

Two different learning methods: velocity-level (v1) and actuator-level (v2).

register(id="jsbsim-uni-uav-sample-v1", entry_point="airgym.envs:JSBSim3DUniUAVEnv",)     
register(id="jsbsim-uni-uav-sample-v2", entry_point="airgym.envs:JSBSim3DALCUniUAVEnv",)   

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

License

MIT


Acknowledgement

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.

  1. Quessy, Alexander, Fixedwing-Airsim

  2. Gordon Rennie, gym-jsbsim

  3. Miocrosoft, AirSim

  4. Codex Laboratories LLC, Colosseum

  5. estshorter, dwa

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%