Servers by jDrones

New Takeoff mode skipped for circle just after launch

Hi,

I just give a try to the new way of auto takeoff and could not make it happened.
“old way” with auto mode and a mission is perfectly working.

Plane is launched by hand, the motor starts within the delay but the motor never get full throttle and is not climbing.
Looking at the log I can see “takeoff skipped” and then switch to CIRCLE but can’t get why.
Not enough speed and altitude for a circle !
Is it because of TKOFF_TIMEOUT ? TKOFF_DIST ? speed ? other ?

TKOFF_TIMEOUT is 10. If I understand correctly, it is the allowed time to reach the speed of 4m/s or DISARM.
TKOFF_DIST is 250 but not clear to me. Is it the distance from the take off point where the plane will loiter ? Meaning that when the plane reached the TKOFF_ALT, it will come back to a distance of TKOFF_DIST to loiter ?

Here is the setup

    RC10_OPTION=77
    TKOFF_ACCEL_CNT,1
    TKOFF_ALT,75
    TKOFF_DIST,250
    TKOFF_FLAP_PCNT,0
    TKOFF_LVL_ALT,20
    TKOFF_LVL_PITCH,15
    TKOFF_PLIM_SEC,2
    TKOFF_ROTATE_SPD,0
    TKOFF_TDRAG_ELEV,0
    TKOFF_TDRAG_SPD1,0
    TKOFF_THR_DELAY,1
    TKOFF_THR_MAX,100
    TKOFF_THR_MINACC,15
    TKOFF_THR_MINSPD,0
    TKOFF_THR_SLEW,100
    TKOFF_TIMEOUT,10

I made several try but same result each time.

log file : https://plot.dron.ee/O9bn
S800 AP4.param (22.1 KB)

Thanks for any tips :slight_smile:

It seems not to be related to Timeout or to the tkoff level altitude or distance.

From mode_takeoff.cpp, it looks like it considers the plane is already flying so enter in circle mode.
But the plane just let my hand, I don’t get that, why skipping takeoff at that stage ?

void ModeTakeoff::update()
{
    if (!takeoff_started) {
        // see if we will skip takeoff as already flying
        if (plane.is_flying() && plane.ahrs.groundspeed() > 3) {
            gcs().send_text(MAV_SEVERITY_INFO, "Takeoff skipped - circling");

Also, I can’t find this message in the log

if (!plane.throttle_suppressed) {
            gcs().send_text(MAV_SEVERITY_INFO, "Takeoff to %.0fm at %.1fm to %.1f deg",
                            alt, dist, direction);
            takeoff_started = true;

Meaning that takeoff never starts ?
But if the motor starts after launch, it means that takeoff has been detected (at least min_accel ) ?

Any help appreciated
thanks a lot

The same happened to me today, just after bungee launch the message tab shows “takeoff skipped” and the plane switch to CIRCLE mode, my parameters are similar to yours.

Downloadable log, please.

Here is the log:

Anyone else tried successfully new TAKEOFF mode?

ok I made some new tests and here what I have.

Takeoff mode works fine if I activate it, stand without moving, and launch the plane. It does what it should do.
Now if I activate the mode, run a little bit (as I am used to do it with heavy plane) and launch the plane, takeoff is not working. motor starts and switch to circle mode.
It can be reproduce at each launch.

Running = fail, not running = ok.

Could it be because of that ?

if (plane.is_flying() && plane.ahrs.groundspeed() > 3) {
gcs().send_text(MAV_SEVERITY_INFO, “Takeoff skipped - circling”);

It’s kind of annoying not to be able to gain some speed before launch. Did I miss something ?
Auto mode with a takeoff mission if perfectly working when running for launch.

Corresponding log file.

First try is with running -> failed
second try without running -> success

Seems when you are running the autopilot decide it is flying. And switch to circle mode.
“I cannot launch if I’m flying”
You can try to run slower specified speed
Or increase speed in that code

yes that is also my conclusion.
3m/s it’s not very fast (for a plane) and on some launch it’s dangerous for the plane to enter in circle mode at such speed and altitude.
Maybe it could be a parameter to define the minimum speed to consider at takeoff or a % of ARSPD_FBW_MIN of another logic to check that condition.

Great discoverment! this might be related with Wiki documentation about takeoff mode here: "…If the mode is entered while already flying, it will immediately begin loitering as in LOITER mode". This mode should consider a faster ground speed or ARSPD_FBW_MIN as you mentioned.

In my case I use bungee launch, this mode would be usefull for me because I could leave the radio control on the ground and have my hands free for launching taking into account the weight of my plane is considerable.

I will do some tests like you described and will report ASAP, thank you!

I also build a firmware with plane.ahrs.groundspeed() set to > 6 to check if it’s really the root cause.
What I don’t get is the plane.is_flying() call. It’s seems that it is not enough to know of the plane is actually flying or not.

I build a fw based on 4.0.4 where I replaced

if (plane.is_flying() && plane.ahrs.groundspeed() > 3)

by

if (plane.is_flying() && plane.ahrs.groundspeed() > 7)

With that change, I was able to run and launch and have a real takeoff without skipping to circle mode.
I might be wrong but whithout other guess and with what I experienced :

  • takeoff mode is all right with small plane that can be launched by hand without initial speed.
  • for my eavy fx61 for exemple, I need to run to help it taking off and for that I had to change that speed in the code. But no idea of the side effect that could occur with that change.

Great job!

Do you know any tutorial for learning how to change the code? thank you!

I could be really helpful to make this parameter configurable and commit your findings to master.
Thanks!

already open a feature request about that but no comment so far.

maybe @peterbarker who requested the log had the time to have a look at it.

Thanks for any suggestion about that.
I would appreciate first to be sure that I am using take off mode in the correct way.

This issue should be solved with this PR

thanks :slight_smile:

i think i had a crash related to this same issue. is there a way to implement this fix right now or do i just need to wait for an official update to arduplane?

wait so this means I need to achieve min accx and also make sure at that point the plane is not already moving at 3m/s?? this seems to contradict each other because by the time you reach a reasonable acceleration like the 12m/s2 suggested, you could have already reached 3m/s, right? I’m about to test my first hand launch, now I’m having second thoughts

It has been solve with this PR but not sure that it has been included in the last stable yet.
If you are not running when hand launching it should be just fine.
You can still use a mission with takeoff command which perfectly works even when running before launch.

Servers by jDrones