0% found this document useful (0 votes)
5 views29 pages

Drone Programming

The document outlines a plan for programming the Tello drone using Python, detailing its features, programming methods, and necessary libraries. It includes instructions for setting up the programming environment, installing libraries, and executing commands to control the drone. Additionally, it covers the use of voice recognition and gesture commands for enhanced control of the drone.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views29 pages

Drone Programming

The document outlines a plan for programming the Tello drone using Python, detailing its features, programming methods, and necessary libraries. It includes instructions for setting up the programming environment, installing libraries, and executing commands to control the drone. Additionally, it covers the use of voice recognition and gesture commands for enhanced control of the drone.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

DRONE PROGRAMMING

PLAN

1- The Tello drone


2- Tello Programming Methods
3- ProgrammerTello with Python

2
THE DRONE TELLO

What is a drone?
It is a small remote-controlled airplane used
for various tasks:
Military sector:

Tactical reconnaissance missions to


high altitude

Battlefield surveillance;

Technological war
3
THE TELLO DRONE

Civil sector:

For surveillance missions


(manifestations, maritime pollution)
forest fires, etc.

In medicine, for the missions of


rescues;

For agriculture;

For deliveries (Zipline);

For the shots;


4
THE Tello DRONE

Characteristics of the DJI Ryze Tello

● A weight of 85g for a size of 98×92.5x41mm


● A 720p HD camera (with a 5-megapixel sensor)
● a 3.8v LiHV battery with a capacity of 110mAh and autonomy

10 minutes.
● From 8 propellers of 3 inches and 4 protections (not

mandatory)
● A micro USB charger/port integrated into the drone

5
PROGRAMMING METHODS FOR TELLO

Method for programming:

On Android: On PC:

TELLO EDU Scratch 2 Mblock 5 Python

6
PROGRAMMER TELL WITH PYTHON

● Preparation
The first step is to install Anaconda.

7
PROGRAMMER TELLO WITH PYTHON

The second step is to install Visual Studio Code

8
PROGRAMMER TELLO WITH PYTHON DJITelloPy library

The third step is to install the necessary libraries:

Djitellopy

Python interface for DJITello drone using a set of tools provided with the platform
official Tello material.

The features:

• Implementation of all tello commands


• Easy recovery of the video stream
• Reception and analysis of status packets
• Control of a swarm of drones
• Support for python >= 3.6

9
PROGRAMMER TELLO WITH PYTHON DJITelloPy Library

Installation :

Windows Debian / Ubuntu

pip install djitellopy pip3 install djitellopy

The installation must be done from the Anaconda command prompt.

- [Link]

10
PROGRAMMER TELL WITH PYTHON Tello Commands

Orders Description
takeoff TakeoffTello
land LandingTello
move_left (x) Fly left for a distance x
cm

move_right (x) Fly right for a distance of x cm


move_forward (x) Fly forward a distance of x cm

move_backward (x) Fly backward over a distance x


cm

rotate_counter_clockwise (y) Turn in the direction of the clock hands


of a watch of y degree
11
PROGRAMMER TELLO WITH PYTHON Tello Commands

Commands Description

flip_left() Flip to the left

flip_right () Flip to the right


hello.

flip_forward () Flip forward

flip_backward() Flip backward

Each command must be preceded by 'tello.'


12
PROGRAMMER A TELL WITH PYTHON Practical case

Example:

13
PROGRAMMER TELLO WITH PYTHON

Available library

apiai assemblyai
wit

watson-developer-cloud

google-cloud-speech
pocketsphinx SpeechRecognition
14
PROGRAMMER TELL WITH PYTHON
SpeechRecognition

Why SpeechRecognition?

Perform voice recognition

Supports multiple speech recognition engines and APIs

Usable online

15
PROGRAMMER TELLO WITH PYTHON
SpeechRecognition

Installation

pip install SpeechRecognition

To be executed from the Anaconda command prompt

Operation

16
PROGRAMMER TELLO WITH PYTHON
SpeechRecognition

Voice recognition:

17
PROGRAMMER TELLO WITH PYTHON
Speech Recognition

Voice recognition:

18
TELLER PROGRAMMER WITH PYTHON
Hand map

● Creation of a virtual environment


The first step is to open an Anaconda terminal.

19
PROGRAMMER TELL WITH PYTHON
Hand map

● Creation of a virtual environment

In the terminal we will execute some commands namely


Conda create -n tello
Y
Conda activate tello
Conda install python==3.7

20
PROGRAMMER TELLO WITH PYTHON
Hand map

21
PROGRAMMER TELLO WITH PYTHON
Hand map

● Installation of libraries
This step involves installing the various dependencies from the
anaconda terminal
Then we will enter the host folder of the requirement.
cd and you tab to enter the host folder of the requirement
Start the installation of the requirement

Once the installation is complete, we will proceed to install our libraries.

22
PROGRAMMER TELLO WITH PYTHON Hand map
PROGRAMMER TELL WITH PYTHON
PROGRAMMER TELL WITH PYTHON
PROGRAMMER TELL WITH PYTHON

The necessary libraries to perform the gesture command are:


Mediapipe
pip install mediapipe
Cvzone
pip install cvzone
OpenCV
pip install opencv-python
Djitellopy
pip install djitellopy
Threading
pip install threaded
Timer
pip install timer
HandDetector
pip install handDetection
PROGRAMMER TELL WITH PYTHON

• Mediapipe offers customizable and cross-platform ML solutions for media.


live and streaming.
• OpenCVestun is a computer vision package that facilitates the execution of its processing functions.
of image and AI
• Threading builds high-level interfaces for multiple execution threads (threading) designed in
based on the low-level thread module.
• Timer is used to manage time complexity in the code
• HandDetector

27
PROGRAMMER TELLO WITH PYTHON

import cvzone
import cv2
import djitellopy
from threading import Timer
from [Link] import HandDetector
fpsReader = [Link]()
cap = [Link](0)
[Link](3, 1280)
[Link](4, 720)

28
PROGRAMMER TELL WITH VS Code

You might also like