TKOFF_THR_MINACC and TKOFF_THR_DELAY doesn't work together

Hi everybody,
Today I tested the new arduplane, all worked perfectly except takeoff. After upgrading from 3.7.1 to 3.8.0, automatic takeoff stopped working when setting both parameters TKOFF_THR_MINACC and TKOFF_THR_DELAY different from 0. In a bungee launch, motor never starts (in 3.7.1 was working ok, problem tested in 2 different airplanes)!
Examples:

TKOFF_FLAP_PCNT,0
TKOFF_ROTATE_SPD,0
TKOFF_TDRAG_ELEV,0
TKOFF_TDRAG_SPD1,0
TKOFF_THR_DELAY,13
TKOFF_THR_MAX,100
TKOFF_THR_MINACC,15
TKOFF_THR_MINSPD,0
TKOFF_THR_SLEW,0

Result: Motor never starts after bungee launch…

TKOFF_FLAP_PCNT,0
TKOFF_ROTATE_SPD,0
TKOFF_TDRAG_ELEV,0
TKOFF_TDRAG_SPD1,0
TKOFF_THR_DELAY,0
TKOFF_THR_MAX,100
TKOFF_THR_MINACC,15
TKOFF_THR_MINSPD,0
TKOFF_THR_SLEW,0

Result: Motor starts on bungee launch, takeoff correct.

TKOFF_FLAP_PCNT,0
TKOFF_ROTATE_SPD,0
TKOFF_TDRAG_ELEV,0
TKOFF_TDRAG_SPD1,0
TKOFF_THR_DELAY,13
TKOFF_THR_MAX,100
TKOFF_THR_MINACC,0
TKOFF_THR_MINSPD,0
TKOFF_THR_SLEW,0

Result: Motor starts on bungee launch, takeoff correct.

TKOFF_FLAP_PCNT,0
TKOFF_ROTATE_SPD,0
TKOFF_TDRAG_ELEV,0
TKOFF_TDRAG_SPD1,0
TKOFF_THR_DELAY,0
TKOFF_THR_MAX,100
TKOFF_THR_MINACC,0
TKOFF_THR_MINSPD,0
TKOFF_THR_SLEW,0

Result: Motor starts on bungee launch, takeoff correct.

Maybe is a small bug?

Thanks in advance!

I had the same issue after upgrading from 3.7 to 3.8, however I had not tracked down to the combination of these two parameters, I was just unable to use auto takeoff. The plane however did takeoff automatically on one instance, where I believe it reached the target takeoff height before starting the motor and then it followed the mission to the next waypoint (LOITER_TO_ALT), as the throttle only goes above 0 after said waypoint is triggered.

I checked the logs and found no errors or anything pointing me towards the right direction and I am currently uploading them to google drive to add to this discussion.

Here is the instance where it took off:

UPDATE: here is the google drive link with the logs: https://drive.google.com/drive/u/1/folders/0B-7Na4cfma4RaUx1N2czTW9vWG8

I’ve also created a new topic (https://discuss.ardupilot.org/t/auto-takeoff-and-reverse-thrust-not-working-after-upgrading-from-3-7-to-3-8/20262) because I’ve found that reverse thrust also stopped working.

Hi @vascodx
could you please post a log file ? I was digging the takeoff code and I couldn’t find any difference between 3.7 and 3.8 - regarding the takeoff procedure…

@igorcampos - I was looking your logs and I see one point, You are having bad launch auto messages, this is a indication your launch angle is too steep -
ahrs.pitch_sensor <= -3000 ||
ahrs.pitch_sensor >= 4500 ||
labs(ahrs.roll_sensor) > 3000)
I was with problems in takeoff with rvjet, now I’m launching with 10 or 15 degrees.
I was using 3.7 too and will test the 3.8 version tomorrow and I will update you about the tests.

@juvinski

I didn’t see the bad launch messages on the tlogs (in fact it said waiting 3.5s, but the motor didn’t spin), where do I see it at the bin logs? I didn’t see any message on the graph when only error was enabled. I wish we could replay a bin log on mission planner, that would be a really useful feature.

Thank you for your attention!

hi @igorcampos

after opening the log file double click on the first row just above the “FMT” and you will receive something like http://ardupilot.org/copter/_images/DiagnosingWithLogs_FilterForErrors.png
then choose MSG
http://ardupilot.org/copter/docs/common-diagnosing-problems-using-logs.html - session Unexpected ERRORS including Failsafes

Hi @juvinski,

I’ve reviewed the messages you described, but the bad launch messages only occur several seconds after the launch, which is when the aircraft touched the ground. It occured on two instances where it failed to takeoff and had rough touch downs. The first one is 30 seconds after the launch, the second is 8 seconds after launch, both are well after the time the motor was supposed to start (3.5 seconds delay).

Thank you for your attention!

Igor

Hi @igor and @vascodx

I found a clue about what is happening.

On a normal takeoff - at least version 7.1 we had in order this events:
Armed
Triggered
Holding course
Takeoff level off
Takeoff complete

On 3.8 - I end a test right now and is missing the Triggered event:
Armed
Holding course

Nothing more

  • if you can check in your logs to see if is the same behavior.

In my cause I’m using:
TKOFF_THR_DELAY = 10
TKOFF_THR_MINACC = 6

The routine is checking:
if (((gps.ground_speed() > g.takeoff_throttle_min_speed || is_zero(g.takeoff_throttle_min_speed))) &&
((now - takeoff_state.last_tkoff_arm_time) >= wait_time_ms)) {
gcs_send_text_fmt(MAV_SEVERITY_INFO, “Triggered AUTO. GPS speed = %.1f”, (double)gps.ground_speed());
takeoff_state.launchTimerStarted = false;
takeoff_state.last_tkoff_arm_time = 0;
steer_state.locked_course_err = 0; // use current heading without any error offset
return true;
}

On my case the GPS speed achieve more than 19 so the first part of if true

I will try how to check the timer part of the code.
This part of code is on function auto_takeoff_check while this function doesn’t return a true value the throttle will be suppressed and the auto takeoff will not occurs.
This is my log: https://drive.google.com/open?id=0B1omx8hPUswTSkpJd3JQc09ZZVE

Hi guys,

I’ll take a look into this. Bungee launches are hard to simulate so it may have slipped by our normal checks. I have a bungee launch plane to test on too with those param options.

One difference between 3.7 and 3.8 is that we removed some of the messages you normally see in Mission Planner. We decided it was a little too verbose to be user-facing. So, just because it’s not showing up in the log doesn’t mean its not happening. I’ll investigate.

Thank you @MagicRuB and @juvinski for your help in solving this matter. I’ve downgraded my plane to 3.7.1 and will reproduce the experiments, let’s see if it works there.

Hi @igorcampos

have you downgraded with success ?
I spent all night to downgrade to 3.7.1 again and I have an issue with elevon_output.
On 3.7.1 I was using elevon_output = 3, after the upgrade to version 3.8 still the same, but to downgrade to version 3.7.1 I removed the parameter file (my board is running linux) and do a fresh configuration and the only way to elevon_output works was setting to 1.
Maybe check this before downgrading - https://github.com/ArduPilot/ardupilot/issues/6522

Regards.

I suspect this was the key change:


I think that commit should be reverted - it does the opposite of what its trying to do.

1 Like

Hi @tridge,

I was checking here but the takeoff_state.launchTimerStarted are with true value once the log shows the message
Armed AUTO, xaccel = 7.2 m/s/s, waiting 1.0 sec
is showed - with that the code appearing to works. What I’m suspecting - in my point of view is the throttle suppressing is not been deactivated at:

// Check ground speed and time delay
if (((gps.ground_speed() > g.takeoff_throttle_min_speed || is_zero(g.takeoff_throttle_min_speed))) &&
    ((now - takeoff_state.last_tkoff_arm_time) >= wait_time_ms)) {
    gcs_send_text_fmt(MAV_SEVERITY_INFO, "Triggered AUTO. GPS speed = %.1f", (double)gps.ground_speed());
    takeoff_state.launchTimerStarted = false;
    takeoff_state.last_tkoff_arm_time = 0;
    steer_state.locked_course_err = 0; // use current heading without any error offset
    return true;
}

I’ve added a PR here to fix it:


it also adds simple bungee, catapult and hand launch simulations to SITL, for easier testing

1 Like