pythondrone.iotello-drone

Tello EDU Drone sending no response


Every time I want to run my code, it sends the following Error Message:

[INFO] tello.py - 129 - Tello instance was initialized. Host: '192.168.10.1'. Port: '8889'.
[INFO] tello.py - 438 - Send command: 'command'
[INFO] tello.py - 462 - Response command: 'ok'
[INFO] tello.py - 438 - Send command: 'mon'
85
[INFO] tello.py - 462 - Response mon: 'ok'
[INFO] tello.py - 438 - Send command: 'mdirection 0'
[INFO] tello.py - 462 - Response mdirection 0: 'ok'
[INFO] tello.py - 438 - Send command: 'takeoff'
[INFO] tello.py - 462 - Response takeoff: 'ok'
[INFO] tello.py - 438 - Send command: 'land'
1
[INFO] tello.py - 462 - Response land: 'ok'
[INFO] tello.py - 438 - Send command: 'takeoff'
[INFO] tello.py - 462 - Response takeoff: 'ok'
[INFO] tello.py - 438 - Send command: 'go 80 0 0 50 m1'
[WARNING] tello.py - 448 - Aborting command 'go 80 0 0 50 m1'. Did not receive a response after 7 seconds
[INFO] tello.py - 438 - Send command: 'go 80 0 0 50 m1'

Here is my current Code:

import djitellopy as Tello

tello = Tello.Tello()



tello.connect()
print(tello.get_battery())
tello.enable_mission_pads()
tello.set_mission_pad_detection_direction(0)


def start():
    tello.takeoff()
    mid1 = tello.get_mission_pad_id()
    print(mid1)
    tello.land()
    tello.takeoff()
    tello.go_xyz_speed_mid(80, 0, 0, 50, mid1)
    mid2 = tello.get_mission_pad_id()
    tello.land()
    tello.takeoff()
    tello.flip_forward()
    tello.land()
    return mid2


def zone2(mid2):
    color = input("Farbe: ")
    tello.takeoff()
    match color:
        case "r":
            tello.go_xyz_speed_mid(80, 70, 0, 50, mid2)
            mid3 = tello.get_mission_pad_id()
            tello.land()
            tello.takeoff()
            tello.go_xyz_speed_mid(0, -70, 0, 50, mid3)
        case "g":
            tello.go_xyz_speed_mid(80, 0, 0, 50, mid2)
            mid3 = tello.get_mission_pad_id()
            tello.land()
            tello.takeoff()
        case "b":
            tello.go_xyz_speed_mid(80, -70, 0, 50, mid2)
            mid3 = tello.get_mission_pad_id()
            tello.land()
            tello.takeoff()
            tello.go_xyz_speed_mid(0, 70, 0, 50, mid3)

    mid4 = tello.get_mission_pad_id()
    tello.go_xyz_speed_mid(80, 0, 0, 50, mid4)


def zone3():
    zstr = input("Zahlen: ")
    zarr = zstr.split(",")
    mid5 = tello.get_mission_pad_id()
    for i in range(len(zarr)):
        z = zarr[i - 1]
        match z:
            case 6:
                tello.go_xyz_speed_mid(0, 70, 0, 50, mid5)
                tello.land()
                if i == 2:
                    print("Beendet!")
                    break
                tello.takeoff()
            case 7:
                tello.go_xyz_speed_mid(0, 0, 0, 50, mid5)
                tello.land()
                if i == 2:
                    print("Beendet!")
                    break
                tello.takeoff()
            case 8:
                tello.go_xyz_speed_mid(0, -70, 0, 50, mid5)
                tello.land()
                if i == 2:
                    print("Beendet!")
                    break
                tello.takeoff()


if __name__ == "__main__":
    mid2 = start()

We have tried to deactivate the Firewall, updated the Drone's Firmware and we have tried it on multiple other Laptops and Drones. But somehow we get the same Error message. We cannot think of any other solution, and we didn't find any other solution on the Internet.


Solution

  • Problem solved! The problem was that I was trying to fly to the z coordinate 0, which obviously doesn't work.