Learner

Track ArUco Marker

This example program demonstrates how to program an autonomous behavior for the Tello, where it automatically acts on what it "sees". This program is a modification of the FindMarker program. In that program, we processed the video stream from the drone looking for the presence of an ArUco Marker in the camera field of view.

Multi-Threaded Face Detection

In the previous lesson we observed that running the face detection function in the program main loop slowed the response to control inputs. Why is that? This happens because the face detection process is a relatively long process. The time taken to process images for faces lengthens the time to complete one main loop in the program. So the program sees and responds to control inputs less frequently. This is not a good situation in most any application but particularly when the program is controlling a machine.

ArUco Maker Detection with OpenCV

OpenCV is a library of image and video processing functions freely available for anyone to use. It is fair to call it an industry standard. OpenCV contains many capabilities accessible at various levels of complexity, but by and large, it is complex and difficult to learn and use. To make it easier to use and more powerful, there are classes in OpenCV that add higher level functions over the base OpenCV API. All of this can make learning OpenCV a daunting task. However there are many tutorials and examples on the internet.

Face Detection with OpenCV

OpenCV is a library of image and video processing functions freely available for anyone to use. It is fair to call it an industry standard. OpenCV contains many capabilities accessible at various levels of complexity, but by and large, it is complex and difficult to learn and use. To make it easier to use and more powerful, there are classes in OpenCV that add higher level functions over the base OpenCV API. All of this can make learning OpenCV daunting task. However there are many tutorials and examples on the internet.

Find a Mission Pad

This exercise builds on FlyGrid to fly a grid search pattern and look for a Mission Pad. A Mission Pad is a mouse pad with a unique pattern printed on it.The pattern encodes a unique pad id number and some other information. The Tello comes with a set of these Mission Pads. The Tello has build-in programming to recognize Mission Pads when they are in view of the front or bottom cameras and read the encoded information from the printed pattern. You can read more about Mission Pads and how you can use them in the Mission Pad Uer Guide.

Fly a Grid Pattern

Now lets extend the last exercise by programming the drone to fly a search grid. When flying a grid, we move forward some distance, turn 90 degrees, move laterally a short distance, turn 90 again, then fly back the same distance. Then we turn the opposite way 90 degrees, fly forward a short distance, then turn another 90 the same way, then repeat the movements. This results in flying a pattern that covers a rectangular area. Search grids are used to examine an area looking for some target or perhaps for mapping the area.

Fly a Square Pattern

Now lets do something more complicated. Lets fly a mission that requires the drone to travel in a square pattern ending up where it started. Examine the code for the FlySquare class.

This class is like the others we have looked at. It uses a Java for loop to execute a set of movements 4 times. We fly forward, turn 90 degrees. Then we repeat until we have flown in a square.

Video Feed

The Tello drone supports sending a video feed from it's forward facing camera over the network connection back to your program. Receiving the video feed and processing it is a complex programming task and requires familiarity with the OpenCV image and video processing library. Fortunately, the Tello-SDK packages video feed processing into easy to use methods that allow you to display the feed on your PC (for a drone's eye view), take still pictures and record the feed to a video file.

Auto Land & Keep Alive

This demo will explore a safety feature of the Tello drone. When in command mode, if the drone does not recieve a new command within 15 seconds, the drone will automatically land. This is handy if your program fails and leaves the drone flying. This feature works most of the time but there are instances where it does not. If the drone is flying but not under control and does not auto land, assuming it is just hovering, you can grab it's body from below between your thumb and fore finger and then twist the drone upside down. This will  automatically shut off the motors.

First Flight

We are now ready to fly the drone under program control. This example adds the command for the drone to take off. When this command is issued the drone will start it's propellors and take off to hover at the default starting height. The take off can take several seconds and the drone will not respond to new commands until take off is completed. The takeOff() method will wait for confirmation from the drone that take off is finished.

Pages