Exemple #1
0
def video_stream():
    tello.streamon()
    while True:
        img = tello.get_frame_read().frame  # get the
        #img = cv2.resize(img, (360,240))
        cv2.imshow("Live Stream", img)
        cv2.waitKey(1)
Exemple #2
0
def udp_video(data, addr):
    tello.streamon()
    data_stream = True
    while data_stream:
        img = tello.get_frame_read().frame  # get the
        #img = cv2.resize(img, (360,240))
        cv2.imshow("Live Stream", img)
        cv2.waitKey(1)
Exemple #3
0
        yv = -speed
    elif keyboard.is_pressed('right'):
        yv = speed

    # Landing
    if keyboard.is_pressed('l'):
        tello.land()

    # Takeoff
    if keyboard.is_pressed('q'):
        tello.takeoff()

    # Flip Forward
    if keyboard.is_pressed('f'):
        tello.flip_forward()

    return [lr, fb, ud, yv]


tello.streamoff()
tello.streamon()

while True:
    vals = get_keyboard_input()
    tello.send_rc_control(vals[0], vals[1], vals[2], vals[3])
    time.sleep(0.05)
    img = tello.get_frame_read().frame
    img = cv2.resize(img, (360, 240))
    cv2.imshow('Image', img)
    cv2.waitKey(1)