Project structure:
- UE + Cesium + Miscroft AirSim => Flight Simulator
- Python (Airsim API + PyGame) => Flight Controller
- Node.js (Express + Socket.io) => Server
- Cesium.js => Client
- FlightSimulator.exe can be found in release.
- Controller need
pip install -r requirements.txt - Server and Client need
Node app.jsto run it.
- If you have XBox controller, you can use it to control the drone without python script. From my side, it is not work very well, but maybe because I use PS4 controller to simulate XBox controller.
- If you use XBox controller or use PS4 controller to simulate XBox controller, you can use
python stick_controller_xbox.py.pyto start the controller.- Click
Xin PS4 orAin XBox to take off the drone. - Click
Oin PS4 orBin XBox will make the drone land.
- Click
- If you use keyboard directly, which will not have different velocity, use
python controller.py. Btw, it use opencvim.showto see some image from drone camera. Nodde app.jsto start the server, and the client will be start in the port3000.- When you start
FlightSimulator.exe, it will load the tile map from google api, so you need wait 15 seconds to load the map. - In client, click
follow viewwill follow the move or freely move the camera. - In client, click
google mapwill show / hide the 3d tiles.
wasdorleft stickmove forward/back or left/right.arrow keyorright stickmove up/down or rotate in yaw.kin keyboard /xin PS4 /Ain XBOX take offlin keyboard /xin PS4 /Ain XBOX landesc/left spcial keyin game pad quit game.
stick_controller.pyis used for PS4 controller, but I have no time to fix bug in it.Google tile map apiwill be deprecated by me in the future, so if you want to use it in the future, you need rebuild the project.
