After mixed success previously, Shreyas and Marcus discovered that there was another SDK that could be used with the drones that used Python and could be used with OpenCV, which they were learning in a robotics class outside of school. This SDK greatly simplified the process of finding the drone's IP and connecting to the drones, as well as sending commands to the drones, which was difficult with the original SDK.
The first step of the code is to import the necessary libraries of code for the program to run as well as connecting to the drone. The drone is referred to as "me" in the code, but with more drones, "me" could be changed to a unique identifier for each drone
The next step is to turn on and resize the video stream and send the takeoff command to the drones and establish the RC link to the drone so that the program can read a keyboard press and send an RC command to the drone
This step of the code uses the HaarCascades library to find faces, and list them for the next step of the code. The Image is also being converted to gray, in order to work with HaarsCascades. Additionally, the box to outline the face is also being defined here on a RGB color spectrum.
The final step of the code takes the faces found in the previous steps and generates commands that will make the middle point of the camera image point at the face, as well as moving forward to keep the face in the frame. It also waits for a land command from the control station when the "q" key is pressed.