Welcome to the ISAE Group Drone Competition MATLAB port code repo!
This code is a MATLAB interface for the physical Tello drone or a simulated one for experimental purposes. The simuled drone binary executable is available at the competition website for Windows, Linux, and Mac. In the competition day, you will have access to a real Tello drone, and this repository code provides libraries that transparently connect MATLAB to either simulated or real Tellos. That said, you will use the same code in your simulations and in the competition day.
Compile the computer vision module. For that, you will need the OpenCV libraries in your system. Please check https://opencv.org/ for downloading and installing instructions. In Linux:
```
cd isae-group-drone
mkdir build
cd build
cmake ..
make
```
This yields a ==tello-vision== executable that contains the computer vision module of the competition. Since MATLAB provides poor access to OpenCV libraries, we've provided to you a separate computer vision module that will communicate with MATLAB through UDP sockets. Please feel free to modify and recompile this code to optimize your race time!
After compilation, you can execute the Tello simulator. However, if it is the first time executing it after downloading it, you might need to add executable access to the recently downloaded ==Tello_Simulator.x86_64== file:
```
chmod +x Tello_Simulator.x86_64
./Tello_Simulator.x86_64
```
After the simulator is up and running, you can execute in MATLAB the Tello init script ==tello_takeoff.m== for configuring its takeoff and video streaming. Finally, you can run the ==tello.slx== file in Simulink, which is the main control and telemetry link for the Tello, and where you will code most of your control actions in MATLAB.