Tello EDU Drone AI with Python

167 Views Asked by At

I am currently working on my Bachelor's thesis, which involves AI-controlled drones utilizing image recognition to navigate through a designated course. However, I am a beginner with programming in Python. As part of my project, I am aiming to implement 8D flips into the flight sequence, but I have encountered a challenge during the process. The drone is not executing the forward flip command.

elif 'flip' in detectedTrafficSign:     # flip
    sendCommand2All('left 30', 4000)
    sendCommand2All('flip f' , 5000)
    flyforward = 0.5
    print ('MODE: Maneuver flip')                          
    mode_status = MODE_FLIGHT_MANEUVER
    drone_complete_action = 0

I'm using this code that I got from my university lecturer and modified to include additional commands for turning and flipping.

After some research, I couldn't find another command for performing a forward flip within the SDK commands. So, I reached out to ChatGPT for assistance. It provided me with a command that is supposed to change the flight mode of the drone to expert mode, and I should use it before executing the flip command. It seems to work to some extent, but in the list of SDK commands, there are only commands for 'mdirection 0/1/2.' I don't fully understand the implications of this new command, and ChatGPT couldn't provide a source for it. If anyone has insights into what this command does or has an alternative solution to fix the problem, I would greatly appreciate the help.

elif 'flip' in detectedTrafficSign:     # flip
    sendCommand2All('left 30', 4000)
    sendCommand2All('ap mdirection 8' , 500)
    sendCommand2All('flip f' , 5000)
    flyforward = 0.5
    print ('MODE: Maneuver flip')                          
    mode_status = MODE_FLIGHT_MANEUVER
    drone_complete_action = 0
0

There are 0 best solutions below