Está en la página 1de 9

SkyCreator

Yesid Manuel Vesga Real


Santiago Aguirre Loaiza
Nicolas Bernal Ayala

Universidad Piloto de Colombia


2023-1
Recomendaciones de uso del drone-tello
Como recomendación, antes de leer este documento deben de tener instalado en su computador el entorno de trabajo
Visual Estudio Code o Pycharm, además del intérprete de Python.

Instalación de la librería DJITellopy en pycharm

Para iniciar con el control del dron Tello ingresamos al entorno de programación Pycharm, si es la primera vez que
utilizan este software les aparecerá la siguiente ventana.

Ingresan al apartado que dice New Project, luego de esto les saldrá una ventana para crear su proyecto.

En el apartado marcado en la imagen van a escoger la carpeta de destino donde desean guardar el proyecto, le asignan el
nombre del proyecto y luego dan clic al botón create.
Luego de haber creado el proyecto damos clic en el apartado File que se encuentra en la esquina superior izquierda y lego
damos clic en Settings

Aparecerá una ventana, en esta vamos al apartado Project: Nombre de la carpeta del proyecto en este caso es: (Project:
Program) luego vamos a Python Interpreter, para agregar una nueva librería damos clic en el (+) que se encuentra en la
esquina superior izquierda.
Saldrá otra ventana donde escribiremos el nombre de la librería que queremos descargar en este caso es: DJItellopy

Por último vamos a la parte inferior izquierda y damos clic en el botón Install Package
Vinculo de dron tello con el computador
Se recomienda verificar antes que la batería del dron se encuentre totalmente cargada y esté bien instalada. En el lateral
derecho se encuentra el botón de encendido, daremos clic en el para encender el dron.

En la parte frontal del dron, al lado de la cámara se encuentra un led, el cual empezará a cambiar de color indicándonos
que el dron se encuentra encendido.

Vamos al wifi de nuestro computador y buscamos la red del dron tello para posterior mente conectarnos a esta y poder
controlar el dron desde el computador.
Programas básicos para controlar el dron

● Chequeo de batería:

● from djitellopy import Tello

tello = Tello()

tello.connect()
print(tello.get_battery())

● Despegue:

from djitellopy import Tello

tello = Tello()

tello.connect()
print(tello.get_battery())
tello.takeoff()

tello.land()

● Vuelo por los ejes X,Y y Z

● from djitellopy import Tello


tello = Tello()
tello.connect()
print(tello.get_battery())
tello.takeoff()

tello.move_forward(100)
tello.move_back(100)
tello.move_left(100)
tello.move_right(100)
tello.move_back(100)
tello.move_forward(100)
tello.move_up(100)
tello.move_down(100)
tello.rotate_clockwise(180)
tello.rotate_counter_clockwise(180)

tello.land()

● Vuelo de forma horizontal.

from djitellopy import Tello


tello = Tello()

tello.connect()

print(tello.get_battery())

tello.takeoff()

tello.go_xyz_speed(100,-100,100,40)
tello.go_xyz_speed(-100,100,-100,40)

tello.go_xyz_speed(100,100,100,40)
tello.go_xyz_speed(-100,-100,-100,40)

tello.go_xyz_speed(-100,100,100,40)
tello.go_xyz_speed(100,-100,-100,40)

tello.go_xyz_speed(-100,-100,100,40)
tello.go_xyz_speed(100,100,-100,40)

tello.land()

● Flips

● from djitellopy import Tello

tello = Tello()

tello.connect()
print(tello.get_battery())

tello.takeoff()

tello.flip_forward()
tello.flip_back()
tello.flip_left()
tello.flip_right()

tello.land()

● Aterrizaje de emergencia
from djitellopy import Tello

tello = Tello()

tello.connect()
print(tello.get_battery())

tello.land()

● Tomar foto

● import cv2
from djitellopy import Tello

tello = Tello()
tello.connect()

tello.streamon()
frame_read = tello.get_frame_read()

tello.takeoff()
cv2.imwrite("picture.png", frame_read.frame)

tello.land()

● Tomar video.

import time, cv2


from threading import Thread
from djitellopy import Tello

tello = Tello()

tello.connect()

keepRecording = True
tello.streamon()
frame_read = tello.get_frame_read()

def videoRecorder():
# create a VideoWrite object, recoring to ./video.avi
height, width, _ = frame_read.frame.shape
video = cv2.VideoWriter('video.avi', cv2.VideoWriter_fourcc(*'XVID'),
30, (width, height))

while keepRecording:
video.write(frame_read.frame)
time.sleep(1 / 30)

video.release()

# we need to run the recorder in a seperate thread, otherwise blocking


options
# would prevent frames from getting added to the video
recorder = Thread(target=videoRecorder)
recorder.start()

tello.takeoff()
tello.move_up(100)
tello.rotate_counter_clockwise(360)
tello.land()

keepRecording = False
recorder.join()

También podría gustarte