Desired altitude Goes to zero then all the way UP when STABILIZE -> GUIDED

When the system is commanded a transition from any mode to STABILIZE then immediately to GUIDED, the Copter descends at maximum rate until the desired altitude hits zero. Then is commanded to climb again at the initial altitude

I had the bug discovered with my copter (3.5.7), simulated in SITL and then tested with the 3.6.0 in SITL.

I posted the .bin from the SITL test here: https://plot.dron.ee/DmCI

1 Like

Same thing happens for RTL -> STABILIZE -> RTL. Vehicle descends, touches ground, then climbs again and flies to the takeoff point and lands

Check the telemetry here: https://plot.dron.ee/mrP5

Same behavior even for default parameters. It looks like it’s triggered by a quick flip RTL->STAB->RTL

https://plot.dron.ee/THjb

Have you considered that STAB is a user controlled throttle mode ? Repeat your experiment but place your manual throttle control at max…

I did multiple time. Anyway, when is back to RTL the throttle should not matter

on the logs you posted ch3 is always at the same position. Please place CH3 (RCIN) at max value and see the behaviour. There is always a jump in altitude when transitioning from a throttle controlled mode to a user controlled throttle mode. There might be a bug, but nevertheless…In any case just open an issue on Github.

I can do it. But still the ch3 should not affect RTL

That is not a jump. The desired altitude goes to zero at maximum speed and then climbs back.

I believe you might be seeing a side effect of the transition between a Throttle controlled mode by the flight controller (like RTL and Guided) and a Throttle controlled by the user.

I can see a similar effect on a racer if I flick the switch between guided/RTL and stab and have the throttle stick too far from the middle position, if the throttle stick is high you an see a copter shooting to the sky or drop if the throttle stick is low.

but again, open a issue on GitHub https://github.com/ArduPilot/ardupilot/issues/new?labels=&template=bug_report.md

Guys please read this real case happened to me - https://github.com/ArduPilot/ardupilot/issues/7519
The root cause was never found.
And here is the part from the log:


Looks just as @tiffo logs :slight_smile:

So I can confirm this is a real critical issue.

@tiffo you could add your great details to 7519

I know is real because we almost lost a vehicle and I can simulate with the SITL easily. It’s very rare that someone did that rapid switch, but if happens… It’s bad. I will open the issue, but I wanted to make people aware of that

Completely agree, a rapid switch could be because of radio link weakness. As in my case.

I posted a comment on Github. This is a serious bug. A glitch or an incautious operator can trigger this fail

Thanks,
actually @khancyr did a PR, so I believe we can expect a fix soon.

I didn’t thought anybody ever will find the reason of my such an old bug :+1:

I’ve created an alternative fix in this PR and tested it and it seems to resolve the problem. If there are no objections I hope to push forward with this fix because I think it more directly fixes the underlying cause of the problem which was that we were resetting the position controller target to zero … but what we really wanted was to report the altitude target (in the dataflash logs) as zero in manual modes.

2 Likes

@rmackay9 - this feels like the descend on radio FS when flying in stab that I have seen - could it be related?

@andyp1per,

No, I don’t think so. I had a peek at the log files you provided and it looks like the EKF isn’t happy with the position estimate. So I think it’s quite different.

Thanks Randy, I am glad we finally spot that bug