QAUTOTUNE - VTOL autotune for quadplanes

Howdy. I’m going to give this a try tomorrow. To clarify mismatched directions: once Autotune is complete > land > switch out of autotune > switch back into autotune > disarm? Thanks!

This is completely wrong! Please do not make up misinformation. You do NOT have to switch out of autotune. Just land and dissarm
If you switch out of autotune, the new values will not be saved!!

Hey man, there is no need to be harsh here. I am sure Peter didn’t mean to misguide anyone.

1 Like

I have just tested both methods in SITL and am pleased to report we are both right. The only requirement to saving the new gains is to be in Qautotune when you disarm. Switching into any other mode during or after the tune completes will NOT reset the gains. Once you switch back in to Qautotune it will pick up where it left off.

Maybe you should double check yourself before you accuse people of ‘making up misinformation’.

In copter switching out and back allows you to test out you new gains before you save them. Once the tune completes it goes back to the original gains and use them in any other modes. Then you can switch back and forth into AUTOTUNE to compare. I believe this is also true for the plane implementation.

@iampete When autotune is done, you are theoretically in Qloiter mode (as far as flight attitude goes). So I don`t see why you would need to switch out to test the new values (if the tune was a success) as far as I know. Just fly around (if you still have the battery left which is rarely the case with Quadplanes, for example yesterday we were doing only Yaw tune on a 12kg VTOL and it took 8mins to complete).

Anyway my point was that the (original/authors) instruction where correct and you were telling him they were wrong. Just gets people confused. As you can see from his reply.

When autotune is done (and reports “successful”), then land in the same mode (qautotune) and then disarm while in it. Then the new values are saved.

PS: I am not aware of what you mentioned as far as the way it works in copter. You might be right about that. I mean to comparison part. Someone would need to verify.

Well, yes, you’re both right!

Sadly, the code is wrong. This should be acting like ArduCopter in that
you should have to land in QAutoTune for the changes to take effect.

1 Like

:+1::+1::+1:
That explains the mix-up then. It also works the way Peters said, but it should not.

I think it should, for a new build I would defiantly be more comfortable landing in Qstabalise, then once landed switch back to Qautotune and save the gains. At least current you have that option.

Dear Peter (Hall), I am not sure I understand why you think it more comfortable. We have used this a few times now. Can you elaborate?

I mean for you to even consider using it, you need your Qloiter to be good or worse case moderate. Check
Then you let it do its thing. Then when done you are free to play with it to see if you like it got better or worse, without switching modes. If it got worse, you would want to forget it anyway so you would switch to other mode (qstab or qloiter).

If it is fine, then you land and disarm and it gets saved. Simple. Safe and comfortable.

From my experience you will not have much time left to play around with it much, right after qautotune. Especially if you attempt to do all axis at one. It does take time and Vtols are not typically optimizes for VTOL endurance.

And from what Peter (Barker) is saying that is how it is done in copter too. I do not know much about copter so I cannot comment.

Less things to go wrong and I am in more direct control. Landing in a position hold modes can cause tip overs, especially if your only half way through setup.

Don’t forget you can autotune in Qhover.

Plane behaviour is the same as copter as far as I know.

I really don’t see any disadvantage to letting people switch out of autotune. You can still do it without switching, just gives more options. The key thing to save gains is to disarm in autotune.

Sure, but on Plane we save regardless of mode. So if your vehicle goes
completely nuts during autotune and you switch to land - we’ll save your
bad gains on landing. Yay!

This is the issue I created for it: https://github.com/ArduPilot/ardupilot/issues/10411

Here are the relevant two lines in the test - qland then wait for
gains-saved string:

donloaded the firmware with ctrl-q in mission planner, updated mission planner to the latest, set flight mode to 22, shows up in mp as “qautotune”. the issue i have is that in full parameterlist “Q_AUTOTUNE_AXES” does not show up. any idea? im on 3.10-dev

you have the ‘advanced’ box ticked?

no facepalm
thanks

i tryed it, did not change the outcome.
you mean the “adavnced” layout in config/tuning -> planner -> adavnced layout?


same with apmplanner2

hum, maybe try installing direct from the latest folder. http://firmware.ardupilot.org/Plane/latest/

download the appropriate .apj and install using the load custom firmware button on the mission planner firmware page.

worked. version number was shown as the same :wink:

Really good. did one axis at a time. afterwards much better hover performance.
if you are interested in logs, i have uploaded the pitch autotune log here. had to switch in qloiter for a second. thought a propeller was coming lose to the sound, but it was just a motorcycle passing by :smiley: the seconde one is just a short qhover -> fbwa -> q hover to check if everything works.

Excelent job guys … Just used autotune for a quadplane. Worked extremely well.

One question;
It hoovers at half throttle in QLOITER mode. When I switch to QSTABILIZE it needs about 70% throttle to stay at the same elevation. What Parameter do we use nto adjust this?
I have been playing with Q_M_THRST_HOVER and Q_M_HOVER_LEARN but doesnt seem to change ?

this PR will fix that