Something isn’t adding up here. As far as I can see the parachute trigger worked as it should. But that’s still just a result of the original problem: Why did the motors go to Min when the drone was in RTL? The drone wasn’t even trying to stabilize it self, yet alone stop the descent.
Even with CTUN.ThO at 0 like it is in Stabilized mode, the motors should at least be keeping the spinning side up. All this to say, I don’t think the problem is with the parachute logic, it’s something before that.
Thank you @Allister !! That is exactly what I am seeing, i cannot make sense of that. I have many years of experience with ardupilot and had never seen something like this.
Do you think you can take a look more in detail and see if something jumps?
@rmackay9@peterbarker Sorry to bother you guys, I would love to have a bit of your time to understand what happened here if you can
CTUN.Alt closely matches CTUN.DAlt, which continues descending until it reaches 107m (even though RTL_ALTITUDE is set to 150m). After that point, the desired climb rate (CTUN.DCRt) is negative (should be positive since Alt < DAlt) as is the requested vertical acceleration.
I suspect there’s room for improvement, but I hesitate to say it’s a bug. It might be an edge-case for RTL to work from an inverted zero-throttle state.
The copter was completely inverted which may explain the strange desired altitude - but I think the problem is still the Stabilise mode with zero throttle, and the copter was probably about to change to disarmed state.
Raising the throttle while still in Stabilise mode probably would have saved the copter, then hit RTL.
This is why I advocate for a spring-centred throttle for multirotors - you can safely put down the transmitter, even bump the sticks, hand the TX to someone else…
Mode changes are not a problem, whether by accident or design.
And PILOT_THR_BHV,7
Going from memory of the last time I looked at this specific code recently, I think the disarm time is 2 seconds for Stabilise or Acro with no throttle.
After doing some tests with the SITL and examining the code, I’ve come to the following conclusions:
Being in STABILIZED with zero throttle for such an amount of time does not disarm, but sets the “auto-armed” flag to false.
// if in stabilize or acro flight mode and throttle is zero, auto-armed should become false
if(flightmode->has_manual_throttle() && ap.throttle_zero && !failsafe.radio) {
set_auto_armed(false);
}
In the RTL state machine, this is interpreted as being on the ground, causing the altitude controller to behave that way.
void ModeRTL::climb_return_run()
{
// if not armed set throttle to zero and exit immediately
if (is_disarmed_or_landed()) {
make_safe_ground_handling();
return;
}
bool Mode::is_disarmed_or_landed() const
{
if (!motors->armed() || !copter.ap.auto_armed || copter.ap.land_complete) {
return true;
}
return false;
}
I agree it’s not a bug.
If you had raised the throttle stick (even in RTL mode), the copter could have recovered altitude.
This is a great in depth analysis, thank you very much. Now i understand why it happened, the thing is that it should have never gone to stabilize but i suppose thats how it works when it goes from no signal to getting back the remote signal.
I had not set the fialsafe on the RC itself, probably that would have saved it as well.