Programming the DJI Ryze Tello drone with Python
And … Action
To complete the picture of the DJI Ryze Tello's feature set, take a look at how you access the camera. To begin, you need to include the opencv-python library in the project. Proceed in the same way as described for the djitellopy library. The very powerful OpenCV [6] library provides extensive functions for image processing.
The program in Listing 4 opens the video stream from the camera and displays it in a new window. Note that the camera displays the many individual images quickly one after the other. To change the resolution of the images, remove the comment hash (#
) at the start of line 8.
Listing 4
Video Stream
Good to Know
In testing, the DJI Ryze Tello turned out to be a light-loving device. If it is too dim in your office, the drone will not work properly and will constantly output messages like error No valid imu. In flight, the camera is used for navigation, and if the camera does not have enough light, the image becomes unusable.
As soon as you take a closer look at the Tello's camera, you will notice that image processing is computationally intensive, so reducing the resolution of the videos to counteract this problem is helpful. Often, even images with a considerably lower resolution are sufficient for further processing.
Nothing is more annoying than a drone that crashes because of a lack of power, so you should check the battery charge level in your program before each start and automatically exit the program if it is too low.
Conclusions
During this test, the drone suffered quite a few collisions with all sorts of objects in the office. Two propellers disappeared never to be seen again after a crash. A houseplant standing in the flight path was involuntarily cut back – and it's surprising how far shredded leaves fly.
During your first flight attempts, take meticulous care to remove any objects potentially standing around in the flight path area and fly the drone in as large a space as possible. At the end of the day, coming to grips with the DJI Ryze Tello and learning more about the little flying machine is massive fun. The only drawback of the compact drone is the relatively poor battery capacity, which will force you to take many breaks.
Infos
- Tello drone on Amazon: https://www.amazon.com/dp/B07BDHJJTH
- Tello drone website: https://www.ryzerobotics.com/tello
- PyCharm download: https://www.jetbrains.com/pycharm/download/
- djitellopy Python library: https://github.com/damiafuentes/DJITelloPy
- USB WiFi adapter: https://www.amazon.com/Edimax-EW-7811Un-Wi-Fi-Nano-Adapter/dp/B08D3DBP55/
- OpenCV: https://opencv.org
« Previous 1 2
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Gnome 47.2 Now Available
Gnome 47.2 is now available for general use but don't expect much in the way of newness, as this is all about improvements and bug fixes.
-
Latest Cinnamon Desktop Releases with a Bold New Look
Just in time for the holidays, the developer of the Cinnamon desktop has shipped a new release to help spice up your eggnog with new features and a new look.
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.