Function to Arm and Takeoff Drone


#1

I just do Function to Arm and Takeoff Drone but in my terminal is always show Current Altitude=0 and it show “ERROR:autopilot:DISARMING MOTORS” How can I fixed it?


#2

Should be

vehicle.mode! = 'GUIDED ’ :

image

So it never got in GUIDED mode and can’t takeoff in the default STABILIZE mode.


#3

I just try your suggestion but it can’t out of this while loop.


#4

Hard to say.
I would invite another student to join in, but If you want to send me your file I will look at it.
dronedojoforum@gmail.com


#5

basic_template.py (1.4 KB)
(Can you look it to me that what is the problem of this code.)


#6

Your code worked fine for me. I can only suggest there is something different how you set up your environment. You might try reinstalling.