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.js
to 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.py
to start the controller.- Click
X
in PS4 orA
in XBox to take off the drone. - Click
O
in PS4 orB
in 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.show
to see some image from drone camera. Nodde app.js
to 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 view
will follow the move or freely move the camera. - In client, click
google map
will show / hide the 3d tiles.
wasd
orleft stick
move forward/back or left/right.arrow key
orright stick
move up/down or rotate in yaw.k
in keyboard /x
in PS4 /A
in XBOX take offl
in keyboard /x
in PS4 /A
in XBOX landesc
/left spcial key
in game pad quit game.
stick_controller.py
is used for PS4 controller, but I have no time to fix bug in it.Google tile map api
will be deprecated by me in the future, so if you want to use it in the future, you need rebuild the project.