While in Loiter Mode: loss of altitude when executing a Yaw

Dave, one more question. What params are you looking at that tell you RTL was triggered by the fence?

Thanks Amilcar, I will use AltHld.

Not a parameter, a message in the log.

Dave, newbieism: Would you mind elaborating on how you view this in the log. Thanks!

Greg-Viewing logs is a basic requirement to advance the performance of Ardupilot controlled craft. This thread is a month old with many results posted since then. View your logs in Mission Planner, APM Planner or UAV Log Viewer and start looking around. Error messages are shown, Flight Modes, and lotā€™s of other information we have been posting about that you can take advantage of and learn from.

To answer your question, the graph is from APM Planner 2 and if you select only ā€œshow modeā€ and ā€œshow EVā€ it will be clear what caused the FS. The same thing can be found in Mission Planner if you hunt around based on the mode change.

ā€œNewbiesmā€ can only last so long :slightly_smiling_face:

Hey Shawn,

AutoTune done, went well, Quad does seem a little bit more stable, but pretty hard to definitively state that. Back to testing Auto mode :smiley:! Again, thanks a lot for all your help!!

Here is a table comparing the changes from pre-AutoTune and Post AutoTune.

.bin if you are interested. https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

None of those parameter changes in the Table have anything to do with tuning and this log you posted shows nothing that does was changed. Actually unless you linked to the wrong log itā€™s configured for Yaw Auto Tune only so perhaps Yaw changed, donā€™t know. As I said look at the ATC parameters to see what changed.

Also adjust you fence params, but dont disable the fence. Increase the Alt and radius as you are more confident that the quad is reliable, Autotune can make the quad move around quite a lot and you could need a bigger radius. Also comply with local laws :slight_smile:
FENCE_ENABLE,1
FENCE_TYPE,3
FENCE_ACTION,3
FENCE_ALT_MAX,50
FENCE_RADIUS,100

Hmm, well that is curious!

The Yaw Auto was the last of the 3 AutoTunes (Roll, then Pitch, then Yaw last). I did not upload the other 2 .bins associated with Roll AT and Pitch AT.

The MP diff. run on the .param(s) was a comparison to the Pre-AutoTuning .param file as compared to the Post AutoTune .param(s) (one for each AutoTune flt). AutoTune run per the doc. i.e. Ch7 = AutoTune = sw A. Flts were conducted as follows: AT off: TO Stab/then Loiter very briefly/then AltHld, then selected Ch7 (AT) active. Let the Quad go through the AT processes, manually corrected position as necessary to stay within a specific airspace. Flew until the Quad stopped twitching, left Ch7 active i.e. in AutoTune. While AT active, switched from AltHld to Loiter, then Stab. and landed. Ch7 / AT active on landing, removed power from the Quad (per the doc.).

No, just leave it totally in Autotune, land and disarm. Wait about 30 seconds, then OK to change modes, arm and fly.

You are missing the point here and an understanding of how Ardupilot mode switching works. If you switch from a mode, Auto Tune in this case, it is overwridden by the new mode. The previous one is NO LONGER ACTIVE.

As I wrote in the previous post:
This is very simple. After Auto Tune completes, change nothing, Land and disarm.

Post Autotune (Roll Only) the quad now exhibits a significant Roll Oscillation. Roll seems a bit sluggish (when executing small Roll attitude changes). When I execute aggressive Roll attitude changes, the quad begins a Roll oscillation that renders the quad nearly uncontrollable. I was able to recover from the initial instance (shortly after completing Roll Autotune), but the 2nd short flight I lost control and a hard landing resulted. Small Roll movements do not result in the Roll Oscillation.
https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

Well, those Roll Parameters wonā€™t work. Auto Tune tuned them into the mud. Compare the ATC values for Roll to what was a decently flying craft. You will have to set the Roll parameters back equal to Pitch which is where they were.

Dave, so AutoTune is not a good approach for me??

Perhaps not Greg. Iā€™m not sure why it did so poorly with your craft. I could suggest something before trying another Auto Tune but it might be a backwards step and you have made a lot of progress up to the point of the Roll Autotune. If you wanted improvement you could try manual tuning which is what I almost always do. However the process can be lengthy and tedious. If you are interested one process is detailed in the Tuning Instructions. Page down to Manual Tuning of Pitch and Roll. And click the link for Transmitter Based Tuning, this can speed up the process greatly if done systematically.

https://ardupilot.org/copter/docs/tuning-process-instructions.html

Hey Dave, I modified the 20mar .param file and changed the ATC_ANG_xx / ATC_RLL_xx params:
image

This seems to have resolved the Roll Oscillation problem and I have plenty of Roll/Pitch authority. The Quad looks / sounds pretty good.

Performed max TX Roll/Pitch (Stab/Loiter and some in AltHld) maneuvers this morn., went well. I do now see a little be of correction in Roll/Pitch (Loiter), that is after a full stick L or R, I see the Quad make a slight corrective action immediately after finish the TX stick movement (I do not remember seeing this before).

I will certainly look at the manual method, thanks!

A problem has resurfaced i.e. loss of altitude while executing a Yaw maneuver Loiter or AltHld??

Any suggestions regarding the Yaw and loss of altitude? Would it make sense to redo the MOT_THST_HOVER?

.bin: https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

I donā€™t see a log there just a parameter file.

Sorry Dave, grabbed the wrong file, here is the .bin.

https://drive.google.com/drive/u/0/folders/1oJu4VgNgmyL_zD6jq1j20pBN_rVmGqK6

Can you list the PR for that? I couldnt find it, and to me it looks like the Autotune code uses Loiter mode anyway. Iā€™ve not been able to tell the difference between starting Autotune in AltHold or Loiter, from a point of view of it moving around the sky during twitching anyway.

Hi Greg,
I highly recommend you set these, or youā€™ll end up with more battery trouble than itā€™s worth
BATT_CRT_VOLT,10.5
BATT_LOW_VOLT,10.8

MOT_THST_HOVER will look after itself and is learnt as you fly.

Iā€™m actually seeing the barometer showing a slight increase in altitude (beyond desired altitude) which is why motor output will be reducing to drop back to what it thinks is desired altitude, and youā€™ll be seeing a physical drop in altitude. I think this would indicate too much prop wash over the flight controller, making it believe thereā€™s a pressure drop.
In fact maybe thereā€™s a constant level of prop wash, and it changes or goes away when you yaw, and then you get the pressure drop.

You could try opening the flight controller case, only four screws, and check if thereā€™s a piece of foam covering the barometer. Thereā€™s usually even some little plastic walls there to contain the foam. Add some if itā€™s missing or misshapen.
You can see it in this old review:
http://dronehitech.com/en/pixhawk-clone-hkpilot32-review/

Otherwise you could try putting a canopy of some sort over the whole flight controller - this fixes issues with fast forward flight and altitude changes too. Upside-down tupperware containers and take-away food bowls are ideal candidates.