- Kaan Kababulut (22331319)
- Cevdet Baran Oral (23002740)
- Taniya Dibaee (22703481)
- Operating System: Windows 10/11 (64-bit)
- Python: 3.8 or higher
- Cosys-AirSim Simulator: Download from official releases (see below)
- Xbox Controller: Optional (keyboard fallback available)
Download the Blocks environment from the official Cosys-AirSim releases:
Windows: https://github.com/Cosys-Lab/Cosys-AirSim/releases
Extract the downloaded archive and place the Windows folder containing Blocks.exe in the project root directory.
Note: Due to time constraints, a custom level design was not implemented. The standard Blocks environment is used for demonstration. A custom level can be provided as a revision if requested.
Option A: Automatic Setup (Recommended)
Simply double-click start_simulator.bat. This script will:
- Check Python installation
- Create a virtual environment
- Install all required dependencies
- Launch the AirSim simulator
- Start the controller application
Option B: Manual Setup
# Create virtual environment
python -m venv venv
# Activate virtual environment
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Run the controller
python main.py- Ensure Cosys-AirSim Blocks.exe is in the
Windows/folder - Run
start_simulator.batOR:- Start
Windows/Blocks.exemanually - Wait for it to load
- Run
python main.py
- Start
| Control | Action |
|---|---|
| Left Stick | Yaw / Throttle |
| Right Stick | Roll / Pitch |
| Right Trigger | Ascend |
| Left Trigger | Descend |
| A Button | Arm / Disarm |
| B Button | Emergency Stop |
| Start | Takeoff |
| Back | Land |
| Key | Action |
|---|---|
| W / S | Pitch Forward / Backward |
| A / D | Yaw Left / Right |
| Q / E | Roll Left / Right |
| Space | Ascend |
| Left Shift | Descend |
| Enter | Arm / Disarm |
| Escape | Emergency Stop |
| R | Reset Simulation |
├── main.py # Main controller application
├── quadcopter_model.py # Mathematical model (Newton-Euler)
├── pid_controller.py # Cascaded PID controllers
├── input_handler.py # Xbox/Keyboard input handling
├── visualization.py # Tkinter GUI and telemetry
├── test_suite.py # Unit and integration tests
├── requirements.txt # Python dependencies
├── start_simulator.bat # Automatic setup script
├── settings.json # AirSim configuration
└── RTS-TermProject-Report-Group30.docx # Project report
The project requires tornado==4.5.3 for compatibility with msgpack-rpc-python (used by cosysairsim). The batch file handles this automatically.
Required Packages:
- numpy
- cosysairsim
- msgpack-rpc-python
- tornado==4.5.3
- XInput-Python
- keyboard
- nest_asyncio
pytest test_suite.py -v"Cannot connect to AirSim"
- Ensure Blocks.exe is running before starting main.py
- Check that port 41451 is not blocked by firewall
"Tornado version conflict"
- Run
pip uninstall rpc-msgpackif you see this error - Then reinstall with
pip install tornado==4.5.3
Controller not detected
- Ensure Xbox controller is connected before starting
- Keyboard fallback is always available
For questions about this project, contact the team leader: Cevdet Baran Oral - cevdetbaranoral@gmail.com