guided mode take off

180 views
Skip to first unread message

Gábor Vásárhelyi

unread,
Nov 19, 2015, 10:40:00 AM11/19/15
to drones-discuss
Hi All!

I am experiencing some kind of an error during guided mode takeoff and I cannot decide yet whether it is my fault or not...

I am controlling the pixhawk with AC 3.3.1 from companion computer in guided mode. When I first give MAV_CMD_NAV_TAKEOFF, it is doing what it should, but if I land and try it again (resetting to guided mode), I get "accepted" acknowledgement for the command but kopter does not start to take off (just low rate motor spinning nothing else)

So in takeoff.cpp the following code is executed for sure since mode is guided and return value is true:

bool Copter::do_user_takeoff(float takeoff_alt_cm, bool must_navigate) 
        switch(control_mode) { 
            case GUIDED:
                set_auto_armed(true);
                guided_takeoff_start(takeoff_alt_cm);
                return true; 

So I guess something gets wrong in guided_takeoff_start(takeoff_alt_cm)

However, interestingly, If I disconnect my companion computer and connect again (but do not change pixhawk), takeoff is working again.

Any hints are appreciated. Thanks,
Gabor


Randy Mackay

unread,
Nov 20, 2015, 2:57:43 AM11/20/15
to drones-...@googlegroups.com

Gabor,

 

     I’ve tested with SITL using master (although I think Copter-3.3.1 should be the same) and I was able to take-off multiple times from Guided mode.

 

     Maybe the problem is outside of ardupilot?  Perhaps the companion computer is not correctly sending the altitude target?

 

-Randy

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gábor Vásárhelyi

unread,
Nov 20, 2015, 5:24:40 PM11/20/15
to drones-discuss
Dear Randy,

thank you for the quick test, I appreciate it. I will take a thorougher look on my side then. Altitude target should be OK (not changing since first takeoff), and arducopter code goes through this line if I get accepted ack:
if (motors.armed() && ap.land_complete && current_mode_has_user_takeoff(must_navigate) && takeoff_alt_cm > current_loc.alt) {
but maybe I screw something up with the ack reception. It is my turn to check :) Thanks again!

Hamish Willee

unread,
Nov 20, 2015, 6:32:11 PM11/20/15
to drones-discuss
Hi Gabor

You could also try this using the dronekit-python examples - they take off in guided mode, and under the hood will be sending the same commands. Upshot, if they work on your platform then ardupilot is certainly working as expected.

Cheers
H

Gábor Vásárhelyi

unread,
Nov 25, 2015, 9:17:55 AM11/25/15
to drones-discuss
python api is great, I copied some stuff from there but I prefer our own c-code framework. You are right that trying that one out could rule out my bugs, I might have a look...

Another guided mode takeoff related issue is that sometimes (could not find out why and when, kind of every time in 3.3.1 and once also in 3.3.2.rc2) just after kopter is leaving ground it changes yaw 10-50 degrees (after it holds its new heading smoothly). Nothing special is sent to it, only 
MAV_CMD_PREFLIGHT_CALIBRATION (gyro and baro), set mode guided and then cmd nav takeoff. 
Sensors and calibration are OK, later on or in manual flight everything is smooth, yaw is stable.

p.s.: are these comments useful and appropriate here? 

Hamish Willee

unread,
Nov 25, 2015, 4:58:48 PM11/25/15
to drones-discuss
p.s.: are these comments useful and appropriate here? 

Seem reasonable to me.

If you can create an (easily) reproducible test case for the yaw issue then I'd post that on the ardupilot github issues list. Another reason why I like dk-python is that setting up such test cases is pretty easy :-)

--
You received this message because you are subscribed to a topic in the Google Groups "drones-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drones-discuss/YiejL60fV60/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drones-discus...@googlegroups.com.

Gábor Vásárhelyi

unread,
Nov 26, 2015, 9:22:56 AM11/26/15
to drones-discuss
Hi All! I am really sorry, the multiple takeoff inability was my fault (awkward).

The yaw issue is still there sometimes, I do not know the cause yet but now I have to be more cautious about what I claim :)

I still cannot control the vehicle well in the z direction with 3.3.2.rc2 but i will do more testing soon.

thanks for all the support!
G.
Reply all
Reply to author
Forward
0 new messages