LibrePilot Forum

Development => Firmware General => Topic started by: lucas on January 27, 2016, 01:10:51 am

Title: Port Tau Labs Autotune to LP
Post by: lucas on January 27, 2016, 01:10:51 am
I read in your issues that a few months back Cliff suggested to implement the TL Autotune in LP. Task LP-76


What happened to that?

If the autcome of an Autotune is solid, I bet a lot of users will migrate form whatever Firmware to LibrePilot.

Title: Re: Port Tau Labs Autotune to LP
Post by: TheOtherCliff on February 21, 2016, 10:53:09 pm
I'm just starting to implement auto-tune on LP.  I would guess that it won't be in the next release, but should be buildable around then?
Title: Re: Port Tau Labs Autotune to LP
Post by: gitit20 on February 27, 2016, 02:47:16 am
I really like the idea of autotune let me know when you need it tested haha :)
Title: Re: Port Tau Labs Autotune to LP
Post by: TheOtherCliff on March 14, 2016, 05:17:51 am
The dRonin AutoTune port to LibrePilot is basically done.  Testers are testing and I am getting tweaking some default values.  I have become optimistic about it actually making it into the coming release.

if you want to build it yourself,
bitbucket  TheOtherCliff  theothercliff/LP-73_blahblah

Better yet, join the FTT and read the FTT thread on it for setup pointers.  :)
Title: Re: Port Tau Labs Autotune to LP
Post by: muchzill4 on March 14, 2016, 09:21:19 am
Holy guacamole! That is great news! :) Good job TheOtherCliff.
Title: Re: Port Tau Labs Autotune to LP
Post by: lucas on March 14, 2016, 02:40:24 pm
Good job Cliff....that was fast!!!
Title: Re: Port Tau Labs Autotune to LP
Post by: aa8mc on March 18, 2016, 05:16:01 am
Cliff can you PM me details on the FTT?
Title: Re: Port Tau Labs Autotune to LP
Post by: Mateusz on March 18, 2016, 09:16:09 am
A bit of background. Autotune feature was initially introduced back in OpenPilot before split of TauLabs happened. You can see that in old GCS movies. Then OP removed Autotune (probably for safety considerations), but TauLabs kept it. I can imagine it was not considered to be safe, for users who have no knowledge of PIDs tuning, but tried using it. Of course Autotune, improved over time, and each team added value to it.

Now it is back in LibrePilot. It is automatic process but in my option it does not remove burden from user of knowing what PIDs are, and how the process works. It may work for everyone else, but you might be the lucky guy from FTT discovering case when it fails miserably. I advice to always check PIDs before flying them, do they make sense for your build ? Be aware that this is development branch of feature that have just been added.

For testing you should use Attitude mode both for tuning and flying. There is a chance that oscillations can make quad climb even at very low throttle, requiring to stop motors, let it fall, recover (repeat) to get it down. Also try to take off with new settings instead of switching to them in flight, to get a feeling how new PIDs work and be prepared to stop it. Another recommendation is not to use big props that put your motors on the edge of power rating. If motors can stand full throttle for long time you should be safe. This is important in case of micro-oscillations, which can make motors hot. Even if the PIDs look reasonable be careful the first time you let props spin with the new PIDs. Bad PIDs can cause oscillations, and that can cause a very low throttle setting to act like 50% throttle, likewise high throttle can become 50% as well. Some oscillations can't be seen or heard, but you can tell they are there if it feels like all throttle settings are closer to 50% than they should be.

All feedback is of great value for further improvements.
Title: Re: Port Tau Labs Autotune to LP
Post by: lucas on March 18, 2016, 03:02:02 pm
Thanks Mateusz.   Do only the FTT guys get to test it?  Or can you share the test FW?
Title: Re: Port Tau Labs Autotune to LP
Post by: liftbag on March 18, 2016, 03:21:33 pm
Thanks Mateusz.   Do only the FTT guys get to test it?  Or can you share the test FW?
Better not to spread around this branch. It can destroy your quad or can be dangerous.
I am among those who have no particular luck with this Autotune.
Title: Re: Port Tau Labs Autotune to LP
Post by: Mateusz on March 18, 2016, 05:02:49 pm
Thanks Mateusz.   Do only the FTT guys get to test it?  Or can you share the test FW?

Hi Lucas,

Do you have spare sacrifice quad that is not expensive ? FTT members usually have a few spare builds and accept risk connected with testing development code.
It is not just firmware (FW) but also GCS that needs patches. People testing now, know already how to build, work with git to fetch changes, which makes testing smoother for developer that can instead focus on fixing issues. However, I don't want to stop you from using this code :) Shame on me if your quad goes bananas, though you were warned ;)
But more seriously, feedback from expert on PID tuning, wouldn't hurt :)

Mateusz
Title: Re: Port Tau Labs Autotune to LP
Post by: lucas on March 18, 2016, 06:21:04 pm
Better not to spread around this branch. It can destroy your quad or can be dangerous.
I am among those who have no particular luck with this Autotune.

Sorry to hear that liftbag...

As of these moment you can find 153 succesful autotune reports on the dRonin website...do you mind testing their autotune?? 

http://dronin.org/autotown/autotuneresults.html#

Your feedback on that will shed light on the reason of your LP autotuning failure.  If you get good results on theirs there could be some glitches on the LP implementation, if you get the same results... then Autotune (Theirs an LP´s) could be deemed unreliable (or even dangerous)

Hi Lucas,

Do you have spare sacrifice quad that is not expensive ? FTT members usually have a few spare builds and accept risk connected with testing development code.
It is not just firmware (FW) but also GCS that needs patches. People testing now, know already how to build, work with git to fetch changes, which makes testing smoother for developer that can instead focus on fixing issues. However, I don't want to stop you from using this code :) Shame on me if your quad goes bananas, though you were warned ;)
But more seriously, feedback from expert on PID tuning, wouldn't hurt :)

Mateusz
 
Every quad that I own is inexpensive (appart from the original FCs on them) and can be considered spares.  I don´t mind the risk involved and don´t mind destroying some of them.  But I don´t know how to work with github, fetch changes, build, etc. 

I´m OK at tuning PIDs, not an expert by any means, but I take the time to tune my quads until I get good results.  If the best way to give some feedback and help this or other user friendly features make their way into the official releases is by joining the FTT I might offer myself (and my quads) for that.  I understand liftbags concern about letting this branch going public if it might be dangerous.


Title: Re: Port Tau Labs Autotune to LP
Post by: Mateusz on March 18, 2016, 06:49:17 pm
If the best way to give some feedback and help this or other user friendly features make their way into the official releases is by joining the FTT I might offer myself (and my quads) for that.

If you want to join FTT, then it would be awesome. I think may liftbags know more.

About dRonin 153 results, I've submitted mine as well, after just running autotune being curious what comes out. I think they're using this data to fine tune algorithm.


Title: Re: Port Tau Labs Autotune to LP
Post by: liftbag on March 18, 2016, 10:24:19 pm

Sorry to hear that liftbag...

As of these moment you can find 153 succesful autotune reports on the dRonin website...do you mind testing their autotune?? 

http://dronin.org/autotown/autotuneresults.html#

Your feedback on that will shed light on the reason of your LP autotuning failure.  If you get good results on theirs there could be some glitches on the LP implementation, if you get the same results... then Autotune (Theirs an LP´s) could be deemed unreliable (or even dangerous)
I think the focus is, what do you expect? I'm used to have really good PIDs in minutes using OPTune. I mean, PIDs good for racing or aerobatics. What I seek, are PIDs at least as good as OPTune PIDs.
For all I know LP Autotune is currently ported from dRonin, so it should not be very different.
Yet I get totally unsatisfactory results, even worse, the result depends on the PIDs used during the test.
At this point, a test with dRonin is a necessary action.
Title: Re: Port Tau Labs Autotune to LP
Post by: peabody124 on March 21, 2016, 03:43:01 am
Just for context/background the original Autotune I wrote for OpenPilot years ago used relay tuning. This required fairly aggressive oscillation. The dRonin Autotune is the same as the Tau Labs one I wrote a few years back. It works quite differently with much smaller oscillations to directly calculate the properties of your multi rotor (primarily the response latency of the motors).

You can see the original testing and description here
https://vimeo.com/104806460

It's convenient because it calculates quite a few of the parameters, and does this from a well grounded framework. You can find the derivation of the calculation of parameters from the system properties here: https://github.com/TauLabs/TauLabs/raw/next/flight/Doc/Autotuning%20Derivation.pdf and hopefully a publication on the actual system identification approach will be coming out in not too long.

Glad you guys are finding it useful! We've had people using it at TL for 2 years now with thousands of successful tunes. I completely agree people should know enough to eye ball the parameters for sanity before trying to fly, though.
Title: Re: Port Tau Labs Autotune to LP
Post by: lucas on March 21, 2016, 02:39:21 pm
Hi peabody, nice to have you around.   

Are there any reasons to believe the Autotune results quality is dependent to the airframe size?

According to one comment made by Cliff on the Pull Request at Bitbucket, he is getting good results on his 330 and 500mm frames, but other testers aren't getting good results on smaller frames.



Title: Re: Port Tau Labs Autotune to LP
Post by: peabody124 on March 25, 2016, 01:27:48 am
Hmm, no I don't have a wonderful explanation for that. I'd like to see test results to have better result (e.g. see which aspect of system identification seems off). I have used it on BrushedSparky (100mm brushed motor), my ZMR150, ZMR250 and a number of other smaller frames. It might be worth (for testing purposes only) to compare to results using TL. There might be some divergence in the controller schemes too that I am unaware of requiring a different calculation of the PIDS.
Title: Re: Port Tau Labs Autotune to LP
Post by: aspire77 on April 12, 2016, 08:35:09 am
Will Autotune support CC3D?
Title: Re: Port Tau Labs Autotune to LP
Post by: donnellb on April 16, 2016, 07:04:21 pm
No. Not enough room from what I understand

Sent from my SM-N920T using Tapatalk

Title: Re: Port Tau Labs Autotune to LP
Post by: rabno1 on April 25, 2016, 01:04:32 am
Can someone give me a quick rough guide to how the librepilot autotune is used?  Ive just built the autotune branch.
Does the txpid module need to be enabled (noticed the grayed out "easytune" setting in the txpid page)?

Im assuming i just need to assign autotune to a flight mode, take off, switch to autotune, hover through the shakes, land, disarm still in autotune, connect to GCS and all the greyed out easytune settings will then be accessible?
Title: Re: Port Tau Labs Autotune to LP
Post by: f5soh on April 25, 2016, 01:23:54 am
Instructions are here:
https://librepilot.atlassian.net/wiki/display/LPDOC/AutoTune
Title: Re: Port Tau Labs Autotune to LP
Post by: rabno1 on April 25, 2016, 01:45:14 am
thanks
Title: Re: Port Tau Labs Autotune to LP
Post by: aspire77 on April 29, 2016, 07:45:29 am
No. Not enough room from what I understand

Sent from my SM-N920T using Tapatalk

Ok, so ill go with Cleanflight or get a KISS FC since LP seems to be pretty dead at all. Dont get me wrong, m8 be a good project for noobs to get in the air but others trim theirs for performance and imho LP is not for the racers....
Title: Re: Port Tau Labs Autotune to LP
Post by: Mateusz on April 29, 2016, 08:23:43 am
Ok, so ill go with Cleanflight or get a KISS FC since LP seems to be pretty dead at all. Dont get me wrong, m8 be a good project for noobs to get in the air but others trim theirs for performance and imho LP is not for the racers....

Belive me it's completly fine with everyone if you use any firmware you like. However, if you are unable to tune your quad without autotune or that module gives you better results than what you can do on your own, then you might want to reconsider implying that other users are "noobs" ;) Especially people that wanted to help you.
Title: Re: Port Tau Labs Autotune to LP
Post by: muchzill4 on April 29, 2016, 08:41:14 am
Belive me it's completly fine with everyone if you use any firmware you like. However, if you are unable to tune your quad without autotune or that module gives you better results than what you can do on your own, then you might want to reconsider implying that other users are "noobs" ;) Especially people that wanted to help you.

Are you serious? We better jump that sinking ship LibrePilot is. Devs clearly don't care and no features are implemented - just look at bitbucket! Forums are inactive and no questions are answered. Plus everybody is raving about Kiss FC so obviously it must be +10 to pilot skills and charisma in general. I suggest renaming the project to NoobPilot and allowing only yaw control of the craft.
Title: Re: Port Tau Labs Autotune to LP
Post by: Mateusz on April 29, 2016, 09:05:39 am
Devs clearly don't care and no features are implemented - just look at bitbucket!

I just checked bitbucket, and I see last original commit 7 hours ago of feature that no other flight software has, then 5 horus ago another commit on another feature ported. Looking at more commits I see them on daily basis. To be able to request pull-up request you need first fork repository, there are 28 forks, each of them can have commits which you dont see on main website.
If you don't like this project so much, why are you still here ?
Title: Re: Port Tau Labs Autotune to LP
Post by: m_thread on April 29, 2016, 09:34:55 am
Belive me it's completly fine with everyone if you use any firmware you like. However, if you are unable to tune your quad without autotune or that module gives you better results than what you can do on your own, then you might want to reconsider implying that other users are "noobs" ;) Especially people that wanted to help you.

Are you serious? We better jump that sinking ship LibrePilot is. Devs clearly don't care and no features are implemented - just look at bitbucket! Forums are inactive and no questions are answered. Plus everybody is raving about Kiss FC so obviously it must be +10 to pilot skills and charisma in general. I suggest renaming the project to NoobPilot and allowing only yaw control of the craft.


Are YOU serious. Whats your problem?


/Fredrik
Title: Re: Port Tau Labs Autotune to LP
Post by: aspire77 on April 29, 2016, 09:42:02 am
Ok, so ill go with Cleanflight or get a KISS FC since LP seems to be pretty dead at all. Dont get me wrong, m8 be a good project for noobs to get in the air but others trim theirs for performance and imho LP is not for the racers....

Belive me it's completly fine with everyone if you use any firmware you like. However, if you are unable to tune your quad without autotune or that module gives you better results than what you can do on your own, then you might want to reconsider implying that other users are "noobs" ;) Especially people that wanted to help you.

Don´t worry i can setup my PIDs so that its nearly perfect. I just think that an autotune m8 be the last point to get it really perfect. If not i don´t care.
Title: Re: Port Tau Labs Autotune to LP
Post by: muchzill4 on April 29, 2016, 10:13:07 am
Guys, you clearly fail to read irony between the lines! :) I have a warm place in my heart for LibrePilot and am amazed by constant development that's put into it. Relax a bit damn it. :D

TL;DR - I wasn't serious. I was mocking haters! ;P
Title: Re: Port Tau Labs Autotune to LP
Post by: liftbag on April 29, 2016, 03:14:35 pm
Ok, so ill go with Cleanflight or get a KISS FC since LP seems to be pretty dead at all. Dont get me wrong, m8 be a good project for noobs to get in the air but others trim theirs for performance and imho LP is not for the racers....

Belive me it's completly fine with everyone if you use any firmware you like. However, if you are unable to tune your quad without autotune or that module gives you better results than what you can do on your own, then you might want to reconsider implying that other users are "noobs" ;) Especially people that wanted to help you.

Don´t worry i can setup my PIDs so that its nearly perfect. I just think that an autotune m8 be the last point to get it really perfect. If not i don´t care.
In my experience  AutoTune is anything but perfect. I'm talking of dRonin AT and LP too. Main issue is that results depends on PID used.
If you can find acceptable PIDs with OPTune and/or EasyTune you're definitely a step forward than AutoTune.
Title: Re: Port Tau Labs Autotune to LP
Post by: liftbag on April 29, 2016, 03:16:09 pm
Guys, you clearly fail to read irony between the lines! :) I have a warm place in my heart for LibrePilot and am amazed by constant development that's put into it. Relax a bit damn it. :D

TL;DR - I wasn't serious. I was mocking haters! ;P

 :)
Title: Re: Port Tau Labs Autotune to LP
Post by: liftbag on April 29, 2016, 03:29:38 pm
Just for context/background the original Autotune I wrote for OpenPilot years ago used relay tuning. This required fairly aggressive oscillation. The dRonin Autotune is the same as the Tau Labs one I wrote a few years back. It works quite differently with much smaller oscillations to directly calculate the properties of your multi rotor (primarily the response latency of the motors).

You can see the original testing and description here
https://vimeo.com/104806460

It's convenient because it calculates quite a few of the parameters, and does this from a well grounded framework. You can find the derivation of the calculation of parameters from the system properties here: https://github.com/TauLabs/TauLabs/raw/next/flight/Doc/Autotuning%20Derivation.pdf and hopefully a publication on the actual system identification approach will be coming out in not too long.

Glad you guys are finding it useful! We've had people using it at TL for 2 years now with thousands of successful tunes. I completely agree people should know enough to eye ball the parameters for sanity before trying to fly, though.

Hi James.
Seem I have the only micro racer in the whole world that hates dRonin AutoTune. I really cannot set a decent PID set with it.
Results heavily depends on PID used. Outer Loop resulting PIDs are almost unflyable (ridiculously high). The quad is an H type, with weights distributed along the longitudinal axis, and Autotune set Roll PIDs higher than Pitch while using OPTune, Pitch PIDs are twice the Roll.
All this is achieved with both LibrePilot and dRonin AutoTune. I finally gave up.
I still have to do more tests with other multi-rotors, because several successful cases are reported in LibrePilot in addition to the many of dRonin.

Paolo
Title: Re: Port Tau Labs Autotune to LP
Post by: MultiBen on May 01, 2016, 06:10:47 am
Is autotune in 'next' or is it a separate git clone that needs to be done?
Title: Re: Port Tau Labs Autotune to LP
Post by: Mateusz on May 01, 2016, 08:47:44 am
Is autotune in 'next' or is it a separate git clone that needs to be done?

Hi Ben,

It is in Cliff's branch at the moment only https://bitbucket.org/TheOtherCliff/librepilot/branch/theothercliff%2FLP-76_Port_Autotune_from_dRonin
One of last changes ported with Autotune is I believe new Yaw calculation from dRonin. This helped with one of my quads as I was getting way too high yaw and warm motors.
Title: Re: Port Tau Labs Autotune to LP
Post by: MultiBen on May 01, 2016, 07:40:01 pm
Thank you!  I just picked up a mini revo and want to try autotune with it, i will give Cliff's branch a try.

Ben
Title: Re: Port Tau Labs Autotune to LP
Post by: MultiBen on May 04, 2016, 01:52:53 am
Cloned, built, flashed, flew.....

I am now an Autotune fanboy.  While I think it is important to understand how the PIDs work and what the adjustment of each does to the handling of a multirotor, I have to say that a fresh quad with stock ( non oscillating PIDs ) with a new mini revo took all of 2 minutes to get it to feel very responsive in Attitude.  Will reset my flight switch and try Rate.

Ben

if interested -

Stock
                            P                             I                                  D
ROLL            0.00300                0.00650                        0.000033
PITCH           0.00300                0.00650                        0.000033
YAW              0.00620                0.01000                        0.000050

Autotune
ROLL            0.00169                0.00326                        0.000047
PITCH           0.00348                0.00670                        0.000098
YAW              0.00733                0.01270                        0.000064

Title: Re: Port Tau Labs Autotune to LP
Post by: Marduk2004 on May 04, 2016, 09:34:46 am
How does you Compile it with Autotune?


Gesendet von iPhone mit Tapatalk
Title: Re: Port Tau Labs Autotune to LP
Post by: MultiBen on May 05, 2016, 12:56:19 am
Here is the autotune howto- it is very straight forward.  I would first get your build environment setup and checkout 'next' or 15.09.  Once you can build gcs and your firmware, you can follow the howto to clone the autotune branch and build it.

https://librepilot.atlassian.net/wiki/display/LPDOC/AutoTune

Ben
Title: Re: Port Tau Labs Autotune to LP
Post by: chromvis on May 18, 2016, 09:15:09 pm
Need help with building autotune version of GCS.
In Windows computer on MSYS2 clone TheOtherCliff/librepilot.git fine but unable to checkout theothercliff/LP-76_Port_Autotune_from_dRonin.
System only allow to checkout 'next' and build it fine The version it actually build is 'LibrePilot-0.0+r1022-ga71fb62_x86_64'
The whole package works fine, it just does not have autotune.
I was following instructions recently updated in "howto/Auto Tune" on LibrePilot wiki, but it seems they are written for Linux.
Could you please, write them for windows?
I am very new with git, I think sleng name for it "noob", but I may be worse, since I have extensive programming experience in Assembler and raw processor codes from 80-th, modern systems are different universe.

Here is what I am getting from MSYS2 (attached)
Title: Re: Port Tau Labs Autotune to LP
Post by: f5soh on May 18, 2016, 09:24:10 pm
Post moved

Be sure you fetch the repo

git fetch

you should also use tab key to complete names, this avoid mistake with branch names.
Title: Re: Port Tau Labs Autotune to LP
Post by: chromvis on May 19, 2016, 06:32:12 am
Was able to successfully build this version only by directing "git checkout" directly to hashtag.
In first start of  librepilot-gcs.exe it started OK after showing black window for about 15 sec. Firmware flashed fine and autotune appears in flight modes.
But "Flight Data" page shows black screen (all other pages work).
Simple debugging (with Visual Studio) shows "no symbol file loaded for Qt5Gui.dll". (My Fault)
I hope it may be helpful info to fix this.
Correction:  This was with direct run from ../librepilot-gcs_release/bin directory . Full installation using r1039 file appears OK. Will go testing now.
BTW. I noticed that easy tune usually result in I coefficients about 3 to 4 times higher than P, while D are small, resulting in sluggish copter behavior. If I tune P about 60 to 75% of optimal from EasyTune and make I = P and rise D about 2 times I am getting much better behavior, sharper and stable. This was for NightHawk 200 EMS 450g
Title: Re: Port Tau Labs Autotune to LP
Post by: chromvis on May 20, 2016, 02:09:44 am
I am impressed!!!
Install on two copters (NightHawk 260 clone with RS2205 motors 6040 props, 30A miniESC DYS BLHeli, 3S battery, 570g,  OpLink copter control with bluetooth telemetry to computer,  and another NightHawk-200 EMS 480g, same OpLink control).
My old PIDs were a bit on aggressive side (P - 0.004, I - 0.004, D - 0.00012 on both Pitch and Roll). There, probably were micro-oscillations, copter was tend to climb. For autotune had to adjust  (P 0.0035; I 0.006; D 0.00008). After just 1 min of light shaking got (Roll: P 0.0034; I 0.0078; D 0.000071; Pitch P .0038; I .0089; D 0.00008) - pretty close to original, although I spend two days to get to these original values, and here is just 1 min - fantastic!
Even better when I was tuning the second one I actually set Accessory 1 knob for SmoothQuick variation which appears to be the best and unexpected feature. After tuning you can vary aggressiveness of the copter. On the quick side I would probably decrease I and increase D a bit more, but it is just great that one can simply turn knob and transfer aggressive racer into polite photographer. Amazing! Thank you very much.
Title: Re: Port Tau Labs Autotune to LP
Post by: MultiBen on May 21, 2016, 03:35:22 pm
Awesome!

Ben
Title: Re: Port Tau Labs Autotune to LP
Post by: feelers12 on May 22, 2016, 12:20:53 am
Hope I don't get attacked for asking.  But when's this meant to out? The only reason I ask is that I've a quad the last month that cannot be tuned!  Had numerous people looking at it.  Or can anyone build it for me and send me a link to try it.  I'm desperate have a race next week!
Title: Re: Port Tau Labs Autotune to LP
Post by: hwh on May 22, 2016, 04:05:18 am
You won't get attacked but you won't get an answer either.  It's meant to be out when everything scheduled for it is done, there is no set date.

Auto tune wouldn't help you anyway, you've posted in other threads that you can't get it to fly at all.  To use auto tune you need to be able to control the aircraft well enough to take off and hover.
Title: Re: Port Tau Labs Autotune to LP
Post by: feelers12 on May 22, 2016, 08:59:24 am
I'd I get it flying someway auto tune can work even with  dronin
Title: Re: Port Tau Labs Autotune to LP
Post by: Tomcatt on June 23, 2016, 03:38:21 pm
Hello guys, is this still supported?
Title: Re: Port Tau Labs Autotune to LP
Post by: Mateusz on June 23, 2016, 04:17:21 pm
Hello guys, is this still supported?

I would rather say available/included. If you ask about Autotune port, as far as I know it's pretty close to being merged. It's very stable, and it seems pull-up request got lots of approvals but few more devs need to click "Approve" button and merge it :) So it will be soon in "next" development branch, and I am almost sure in upcoming release.
Title: Re: Port Tau Labs Autotune to LP
Post by: chromvis on June 24, 2016, 10:43:59 pm
I want to try it on Sparky2. I install next version on it - looks OK, although FC is not mounted on quad yet, just did basic tests and calibration on FC itself.
Is anyone tried autotune on Sparky2? I did it on 2 quads with revolution FC with now mixed feelings. One, small NightHawk 200 fly very good after this tune. Another, NightHawk280 clone with BLHeli 30A and RS2205 motors 6040 props (3S bat) heats motors and ESCs - looks like high frequency vibrations (may be not, but it did not do that before autotune).
Any suggestions how to modify parameters (I played a bit with D, not much effect)?
Does it make sense to wait until it merged with next? (I actually lost my latest autotune build and have to build it again)?
Thanks for any suggestions/comments.
Title: Re: Port Tau Labs Autotune to LP
Post by: Mateusz on June 24, 2016, 11:13:41 pm
I want to try it on Sparky2. I install next version on it - looks OK, although FC is not mounted on quad yet, just did basic tests and calibration on FC itself.
Is anyone tried autotune on Sparky2? I did it on 2 quads with revolution FC with now mixed feelings. One, small NightHawk 200 fly very good after this tune. Another, NightHawk280 clone with BLHeli 30A and RS2205 motors 6040 props (3S bat) heats motors and ESCs - looks like high frequency vibrations (may be not, but it did not do that before autotune).
Any suggestions how to modify parameters (I played a bit with D, not much effect)?
Does it make sense to wait until it merged with next? (I actually lost my latest autotune build and have to build it again)?
Thanks for any suggestions/comments.

Hi,

I also used Autotune on two builds with Sparky2. First one 250mm works like charm and is way more responsive, the other one 290 had micro-oscilations and motors were gettng hot, as well. That's why this module shouldn't be used blindly, but PIDs require checking them before flying.
You can tell if something is wrong either from high Yaw PIDs or if your copter does not lift up (requires too much throttle). Then just don't fly that. Latest Autotune had extra limiting factor which prevents over-estimated high PIDs, and solved the problem of micro-oscillations for me. Were you using recent one ?

As for pull-up request you can find it in the git and follow it, but it is close to being merged and pretty much approved, so I guess it will be very soon in next branch.
 
Title: Re: Port Tau Labs Autotune to LP
Post by: chromvis on June 25, 2016, 12:50:15 am
Hi,
I used it early May, so it may be old. I will set Sparky2 on 380 quad with 2000kv motors and test without Autotune first. My be by this time tune will be merged to next. Thanks.
Title: Re: Port Tau Labs Autotune to LP
Post by: TheOtherCliff on June 25, 2016, 04:14:01 am
AutoTune has not been merged into next yet,
You can search the wiki for autotune.  It shows you where to get the source code, etc.

I found some parts of the original timing measurement that the original code did not take into account and I put it into:
    ssh://[email protected]/TheOtherCliff/librepilot.git
    theothercliff/LP-340_AutoTune_fix_some_time_measurement_issues_in_original_code

It would help if you could build this and see if it works better for both your quads.

Thanks!
Title: Re: Port Tau Labs Autotune to LP
Post by: chromvis on June 25, 2016, 05:03:39 am
I will try in a week or two.
Title: Re: Port Tau Labs Autotune to LP
Post by: chromvis on June 27, 2016, 03:57:42 am
I tested autotune (build r1212-gb5890b9) on three different copters:

1.   NightHawk 200  with EMax 2204 2300kv motors with Dalprop 50x45x3 props, 20A BLHeli ESC (not OneShot), 3S 1500 mAh battery, Revolution FC, weight 540g with bat.)
2.   NightHawk 280 clone with RS2205 2300kv motors, GemFan 60x40x2 props, 30A BLHeli ESC (One Shot), 3S battery, Revolution FC with GPS and external mag, total weight 780 g with 4000 mAh batt.; and 700 g with 2200 mAh batt.
3.   380 quad with EMax MT2208-II 2000 kv motors with 60x40x2 props (with 70x45 props hovering was at 10% throttle), 30A BLHeli ESC, 4S battery 2650 mAh, Sparky-2 FC with GPS and external mag, total weight 960 g.

On 200 quad autotune process was smooth. Although copter is not very agile even at SmoothQuick Accessory at 100% (I set it to Accessory 1 slider). There are very minimal difference in the copter reaction between 0 and 100% slider position.

Minimal PID (smooth)     Roll      Pitch      Yaw
      P          0.00052      0.00098   0.00148
      I          0.00058      0.00110   0.00134
      D          0.000045   0.000085   0.000102
Max (agile)            Roll      Pitch      Yaw
      P         0.00185      0.00350   0.0042
      I         0.00408      0.00773   0.00661
      D         0.000080   0.000151   0.000168

Tuning of the second copter was not successful at all. With big battery (4000 mAh, 770g) it run through half of tuning process and start falling. I had to jerk throttle up to keep it flying. After two or three jerks it fall. Restart at default settings (Bank 1) was OK, it flew smooth.
With 2200 mAh batt. 700 g same copter went through autotune a bit longer but did not finish, just fell.
I have to do some more tests, I am not sure that it is autotune fault, it may be calibration or setup, or ESCs – this copter gave me headaches before too.
Third (380) copter with Sparky 2 flight controller went through autotune without any problems. Right after original assembly, it was its maiden flight (with Sparky 2).
Results were the most impressive. Big difference between smooth and agile modes. Very fast reaction without jerks and noticeable overshoots (even in most agile form). Very good feeling to fly it.

Minimal PID (smooth)     Roll      Pitch      Yaw
      P          0.00183      0.00254   0.00634
      I          0.00401      0.00555   0.01209
      D          0.000030   0.000041   0.000082
Stab      P         4.28      4.28
      I         2.248   2.248

Max (agile)            Roll      Pitch      Yaw
      P         0.00498      0.00690   0.01250
      I         0.01883      0.02606   0.03238
      D         0.000060   0.000083   0.000135
Stab. P = 6.695  and I = 3.516 (same for Roll and Pitch)
I am a bit surprised that in agile set derivative term is lower than in smooth mode. D, generally allow damping overshoots faster. Any way, it fly very well.

Would be happy to hear suggestions and questions.
Title: Re: Port Tau Labs Autotune to LP
Post by: Tomcatt on June 27, 2016, 04:43:07 am
Let me know when you have a build for the Revolution.  I'll test it for you. :)
Title: Re: Port Tau Labs Autotune to LP
Post by: smfelton on June 27, 2016, 08:49:06 pm
AutoTune has not been merged into next yet,
You can search the wiki for autotune.  It shows you where to get the source code, etc.

I found some parts of the original timing measurement that the original code did not take into account and I put it into:
    ssh://[email protected]/TheOtherCliff/librepilot.git
    theothercliff/LP-340_AutoTune_fix_some_time_measurement_issues_in_original_code

It would help if you could build this and see if it works better for both your quads.

Thanks!

I'm not very familiar with bitbucket, how do I change to this repository, i'm building 'next' on my hackintosh without any issues but I must admit trying to get to this is baffling me.
Thank you
Shane
Title: Re: Port Tau Labs Autotune to LP
Post by: f5soh on June 27, 2016, 09:08:40 pm
Declare another remote repository, named cliff_repo here:

Code: [Select]
git remote add cliff_repo https://bitbucket.org/TheOtherCliff/librepilot.git
fetch the repo and checkout the branch

Code: [Select]
git fetch cliff_repo
git checkout theothercliff/LP-340_AutoTune_fix_some_time_measurement_issues_in_original_code
Title: Re: Port Tau Labs Autotune to LP
Post by: chromvis on June 27, 2016, 09:10:06 pm
i am using Windows Msys2. It works fine. Basic procedure description is given in https://librepilot.atlassian.net/wiki/display/LPDOC/Windows+Building+and+Packaging .

In "Get the code using Msys2" section instead of "ssh:" use "https:"
I mean:  "git clone https://[email protected]/TheOtherCliff/librepilot.git ". You can add the name for new directory at the end after space.
then "cd ... " to your directory
then  "git checkout  theothercliff/LP-340_AutoTune_fix_some_time_measurement_issues_in_original_code"
After that you can either choose to build specific part (although I am not that much experienced in it, so I just usually ask to make the whole package exactly as it is written in the manual. It takes longer (on my i5 laptop about 1 hour) but i will have all firmware, installation file and ready to run software (be aware, it is additional 1.8 Gb on disk).h
Title: Re: Port Tau Labs Autotune to LP
Post by: f5soh on June 27, 2016, 09:16:58 pm
Using various "remote" repos like i explained in previous post avoid redo the "git clone" every time you want to change the active repo.

a simple

Code: [Select]
git remote
list all repo avialable from the same source dir
Title: Re: Port Tau Labs Autotune to LP
Post by: smfelton on June 27, 2016, 10:38:39 pm
Fantastic thank you guys, very much appreciated.
Shane
Title: Re: Port Tau Labs Autotune to LP
Post by: smfelton on June 28, 2016, 12:06:49 am
Tried to compile and after about 5 minutes I get this :

/Users/smfelton/code/librepilot/flight/modules/AutoTune/autotune.c:602: undefined reference to `gyroReadTime'
collect2: error: ld returned 1 exit status
make[1]: *** [/Users/smfelton/code/librepilot/build/firmware/fw_discoveryf4bare/fw_discoveryf4bare.elf] Error 1
make: *** [fw_discoveryf4bare_opfw] Error 2

ny ideas ?

Shane
Title: Re: Port Tau Labs Autotune to LP
Post by: f5soh on June 28, 2016, 12:20:15 am
you don't need the discoveryf4bare firmware.

Just compile the needed firmware, followed with Gcs build and start

Code: [Select]
make -j2 opfw_resource && make -j2 gcs && ./build/librepilot-gcs_release/bin/librepilot-gcs
Title: Re: Port Tau Labs Autotune to LP
Post by: Tomcatt on June 28, 2016, 02:26:39 am
i am using Windows Msys2. It works fine. Basic procedure description is given in https://librepilot.atlassian.net/wiki/display/LPDOC/Windows+Building+and+Packaging .

In "Get the code using Msys2" section instead of "ssh:" use "https:"
I mean:  "git clone https://[email protected]/TheOtherCliff/librepilot.git ". You can add the name for new directory at the end after space.
then "cd ... " to your directory
then  "git checkout  theothercliff/LP-340_AutoTune_fix_some_time_measurement_issues_in_original_code"
After that you can either choose to build specific part (although I am not that much experienced in it, so I just usually ask to make the whole package exactly as it is written in the manual. It takes longer (on my i5 laptop about 1 hour) but i will have all firmware, installation file and ready to run software (be aware, it is additional 1.8 Gb on disk).h

Your welcome.

It's better for me to use the "git clone" way.  I'm not up to speed with all the git usage but I know enough to get around.  I'm downloading it now for OS X.
Title: Re: Port Tau Labs Autotune to LP
Post by: smfelton on June 28, 2016, 02:39:31 am
you don't need the discoveryf4bare firmware.

Just compile the needed firmware, followed with Gcs build and start

Code: [Select]
make -j2 opfw_resource && make -j2 gcs && ./build/librepilot-gcs_release/bin/librepilot-gcs

Brilliant thank you again. Now I can sleep !!  :)
Title: Re: Port Tau Labs Autotune to LP
Post by: smfelton on June 28, 2016, 03:41:46 pm
Ok new day, new start. All compile fine now thank you so much. Only problem is there is no 'Autotune' button on the config tab. If I search in 'System' there is an optional module in HWsettings which I can enable but i'm guessing this is only a setting for the FC as it doesn't change anything in the gui.
Really sorry to be sounding like such a noob.
Shane
Title: Re: Port Tau Labs Autotune to LP
Post by: chromvis on June 28, 2016, 04:07:38 pm
There should be no button. Autotune is a flight mode. Read carefully the whole section in https://librepilot.atlassian.net/wiki/display/LPDOC/AutoTune.
Title: Re: Port Tau Labs Autotune to LP
Post by: smfelton on June 28, 2016, 04:53:04 pm
Oh right ok, I must be getting confused with the Taulabs videos, as they have an 'Autotune' button under the TxPID button on the Configuration tab.
Just one thing, if there is no button where is the "SmoothQuick" mentioned in that document as I can't find it ?
Thanks for your help.
Title: Re: Port Tau Labs Autotune to LP
Post by: Mateusz on June 28, 2016, 05:08:30 pm
Its not yet exposed in GUI , but you can enable it via UAV objectsbrowser, same place you enable Autotune. All your settings are there also from any other module, those are XML objects that firmware accepts. 
Title: Re: Port Tau Labs Autotune to LP
Post by: smfelton on June 28, 2016, 05:40:17 pm
Ok thank you all very much.
Title: Re: Port Tau Labs Autotune to LP
Post by: chromvis on June 28, 2016, 06:22:52 pm
I did not quite get what Mateusz mean: "enable it via UAV objectsbrowser, same place you enable Autotune".
I did it by assigning in System>Settings>SystemIndentSettings>SmoothQuickSettings to 11 (which is Accessory 1) and associating Accessory 1 to input channel 6, which was assigned to rear right slider on my RadioLonk TX. These settings could be modified to your personal preference.
I myself did not quite get yet wht will happen if I copy Bank 2 (with tuning results) into Bank 1. I am not sure if SmoothQuick will be working on Bank 1.
Title: Re: Port Tau Labs Autotune to LP
Post by: TheOtherCliff on June 29, 2016, 06:42:10 pm
Thanks for the feedback!

On 200 (not OneShot) quad autotune process was smooth. Although copter is not very agile even at SmoothQuick Accessory at 100% (I set it to Accessory 1 slider). There are very minimal difference in the copter reaction between 0 and 100% slider position.

Minimal PID (smooth)     Roll      Pitch      Yaw
      P          0.00052      0.00098   0.00148
      I          0.00058      0.00110   0.00134
      D          0.000045   0.000085   0.000102
Max (agile)            Roll      Pitch      Yaw
      P         0.00185      0.00350   0.0042
      I         0.00408      0.00773   0.00661
      D         0.000080   0.000151   0.000168
The PIDs are more than tripled between smooth and quick.  You should have been able to feel a difference.
I would recheck my Flight Mode Switch setup to make sure that my post tune test was using bank 2.  :)
Also, make sure that both your PID bank 2 roll rates are as high as you want.  Stock is slow and maybe you forgot to increase roll rates in bank 2.  :)
Not OneShot...  What protocol (and speed if PWM) are you using?  Slow ESCs (or increasing GyroTau) will produce a slow responding tune.

Tuning of the second copter was not successful at all. With big battery (4000 mAh, 770g) it run through half of tuning process and start falling. I had to jerk throttle up to keep it flying. After two or three jerks it fall. Restart at default settings (Bank 1) was OK, it flew smooth.
With 2200 mAh batt. 700 g same copter went through autotune a bit longer but did not finish, just fell.
I have to do some more tests, I am not sure that it is autotune fault, it may be calibration or setup, or ESCs – this copter gave me headaches before too.
- In my experience, "falling" is usually caused by a bad motor wire or connector.  Randomly the vibration will make the connection be open some times and then it falls because it can't stabilize, because the disabled motor goes to 100% and the other motors go to zero.
- Were any of the motors or ESCs too hot afterward?
- Also I once had a similar problem that seems to be because I was running props that were too large.  I assumed it would be OK if I was just hovering but it wasn't OK.
- Also, do you use a battery voltage alarm?  Be aware that autotune uses a lot of power.  If you don't use a voltage alarm it may be that the battery voltage dropped so low that the ESC's reset.

Third (380) copter with Sparky 2 flight controller went through autotune without any problems. Right after original assembly, it was its maiden flight (with Sparky 2).
Results were the most impressive. Big difference between smooth and agile modes. Very fast reaction without jerks and noticeable overshoots (even in most agile form). Very good feeling to fly it.
Thanks.  Good to hear.
Title: Re: Port Tau Labs Autotune to LP
Post by: TheOtherCliff on June 29, 2016, 06:58:21 pm
AutoTune has not been merged into next yet,
You can search the wiki for autotune.  It shows you where to get the source code, etc.

I found some parts of the original timing measurement that the original code did not take into account and I put it into:
    ssh://[email protected]/TheOtherCliff/librepilot.git
    theothercliff/LP-340_AutoTune_fix_some_time_measurement_issues_in_original_code

It would help if you could build this and see if it works better for both your quads.

Thanks!

I'm not very familiar with bitbucket, how do I change to this repository, i'm building 'next' on my hackintosh without any issues but I must admit trying to get to this is baffling me.
Thank you
Shane

Probably the easiest way is to clone it into a new directory.

There are command line git instructions for cloning in the AutoTune wiki article:
https://librepilot.atlassian.net/wiki/display/LPDOC/AutoTune

Or you can go to this page and press the clone button to get the SSH cloning command.
https://bitbucket.org/TheOtherCliff

Edit: I see that F5soh has posted another way to do this into your current development directory.  That works too.
Title: Re: Port Tau Labs Autotune to LP
Post by: TheOtherCliff on June 29, 2016, 07:06:14 pm
Just one thing, if there is no button where is the "SmoothQuick" mentioned in that document as I can't find it ?
Thanks for your help.

The default is to use the flight mode switch toggle method.  This is enabled if you use defaults.  Read about it in the wiki if you want to use the FMS toggle method.
Title: Re: Port Tau Labs Autotune to LP
Post by: TheOtherCliff on June 29, 2016, 07:20:26 pm
I did not quite get what Mateusz mean: "enable it via UAV objectsbrowser, same place you enable Autotune".
I did it by assigning in System>Settings>SystemIndentSettings>SmoothQuickSettings to 11 (which is Accessory 1) and associating Accessory 1 to input channel 6, which was assigned to rear right slider on my RadioLonk TX. These settings could be modified to your personal preference.
I myself did not quite get yet wht will happen if I copy Bank 2 (with tuning results) into Bank 1. I am not sure if SmoothQuick will be working on Bank 1.

You two were saying the same thing.  UAVO browser is GCS -> System.  :)

When you set up the Flight Mode Switch to have AutoTune on it, you can tell it which PID bank to fly with while you are tuning.

AutoTune stores its math results (not PIDs) in System>Settings>SystemIndentSettings
Storing the math results is done after a successful running of AutoTune
AutoTune uses its stored math results when it outputs PID settings into the desired PID bank
Outputting PID settings into the desired PID bank is done after a successful running of AutoTune, but also at other times, like when you move the SmoothQuick knob.
AutoTune knows which PID bank to write by looking in System>Settings>SystemIndentSettings>DestinationPidBank
System>Settings>SystemIndentSettings>DestinationPidBank is set to 2 by default
Title: Re: Port Tau Labs Autotune to LP
Post by: TheOtherCliff on June 29, 2016, 07:43:08 pm
Only problem is there is no 'Autotune' button on the config tab. If I search in 'System' there is an optional module in HWsettings which I can enable but i'm guessing this is only a setting for the FC as it doesn't change anything in the gui.
Really sorry to be sounding like such a noob.
Shane

FYI: You don't even need to enable the AutoTune module as that is done automatically if it sees AutoTune in the FMS switch.

To add to explanations already given, it was done this way so that you could set it all up on your GCS at home and then run it at the flying field without using a GCS at the flying field.  Normal FMS setup for AT (see wiki) would allow you to fly with stock PIDs, tune with AT (using stock PIDs while tuning), and fly with the AT tuned PIDs; all as many times as you want.  Even fly stock PIDs after tuning.  All without GCS at the flying field.

Also: If you have a SmoothQuick slider/knob configured and you manually enable the AutoTune module in System->Settings->HwSettings->OptionalModules, then even after you remove AT from your FMS the SmoothQuick slider/knob will still work (obviously won't work with the FMS toggle version of SmoothQuick).
Title: Re: Port Tau Labs Autotune to LP
Post by: chromvis on June 29, 2016, 09:48:36 pm

- In my experience, "falling" is usually caused by a bad motor wire or connector.  Randomly the vibration will make the connection be open some times and then it falls because it can't stabilize, because the disabled motor goes to 100% and the other motors go to zero.


Brilliant analysis. That is exactly what happened. I suspected something like that and yesterday checked power assembly. I was using 2mm bullet connectors (should have just solder) and they are notorious to be loose although I tested each pair before soldering, one pair appears to to have some axial freedom. I replaced it and use 50x40x3 props instead of 60x40x2. Autotune went through OK, but 5 inch props are to small for 280 frame and 700 g. Quad feels slow, if hovers at about 50% throttle but even at most agile setup not too responsive.
In Basic tab on Bank 2 already at 50% SmoothQuick slider position Pitch and Yaw sliders show red warnings on P and I, so it is definitely to weak with these props.
I will do some more testing today. I want to set Loging for actual and desired pitch, Roll and Yaw using OPLink. Would appreciate recommendations which parameters to include in log set. As I understand, I have to create set in Tools>Options>scopes and mark "log data to csv file" box. It seems like system start loging instantly. Is it possible to trigger log by arming command?
Title: Re: Port Tau Labs Autotune to LP
Post by: TheOtherCliff on June 30, 2016, 07:24:56 am
Quote
Quad feels slow, if hovers at about 50% throttle but even at most agile setup not too responsive.
In Basic tab on Bank 2 already at 50% SmoothQuick slider position Pitch and Yaw sliders show red warnings on P and I, so it is definitely to weak with these props.
You need to use the advanced page.  You will see that the MaxRateLimit is 300 degrees per second and that must be increased if you want to flip faster than that.  AutoTune sometimes makes PIDs that previously were considered radical.  If you decide to try them and they fly fine, you could consider keeping them.

Quote
I will do some more testing today. I want to set Loging for actual and desired pitch, Roll and Yaw using OPLink. Would appreciate recommendations which parameters to include in log set. As I understand, I have to create set in Tools>Options>scopes and mark "log data to csv file" box. It seems like system start loging instantly.
If you have telemetry, I would recommend that you log the telemetry as receive by the GCS (laptop).  Tools -> StartLogging.
Assuming you are wanting to debug Rate mode flight:
RateDesired is what you have commanded it to do.
GyroState is what is actually happening.
These are both in degrees per second, so they are easily comparable.
Title: Re: Port Tau Labs Autotune to LP
Post by: chromvis on July 03, 2016, 05:12:21 am
OK. I fix motor-to-ESC connections, but got another problem with magnetometers. It seems like they got completely crazy. I calibrated them using OPLink far from any interference, system shows "calibration successful" and there seems to be no way to synchronize them with Roll/pitch/yaw rotation bars. With some time magnetometer error increases and I had to recalibrate them again, I gave up and reflush firmware and using no GPS settings - everything is OK (although on-board mag still fluctuates around 10% error).
Run autotune - no problem. At aggressive SmoothQuick slider position quad jerking a bit and Yaw get into red warning zone.
I tried to visualize tuning by setting RateDesired and GyroState to 100 ms logging, It seems to be working, at least I got 74Kb .opl file, but I could not fine the way to read it. I searched in manual, forum, Google and there are no info on how to work with GCS log file.
So, two questions: 1. how to check if magnetometer is OK? any software allowing mag verification?
                            2. How to replay and analyse GCS .opl files?

 
Title: Re: Port Tau Labs Autotune to LP
Post by: TheOtherCliff on July 03, 2016, 08:23:21 pm
OK. I fix motor-to-ESC connections, but got another problem with magnetometers. It seems like they got completely crazy. I calibrated them using OPLink far from any interference, system shows "calibration successful" and there seems to be no way to synchronize them with Roll/pitch/yaw rotation bars. With some time magnetometer error increases and I had to recalibrate them again, I gave up and reflush firmware and using no GPS settings - everything is OK (although on-board mag still fluctuates around 10% error).
Run autotune - no problem. At aggressive SmoothQuick slider position quad jerking a bit and Yaw get into red warning zone.
I tried to visualize tuning by setting RateDesired and GyroState to 100 ms logging, It seems to be working, at least I got 74Kb .opl file, but I could not fine the way to read it. I searched in manual, forum, Google and there are no info on how to work with GCS log file.
So, two questions: 1. how to check if magnetometer is OK? any software allowing mag verification?
                            2. How to replay and analyse GCS .opl files?

I don't recall you saying what kind of mag you are using.  If you are using an aux mag then:
- Both GPS/mag and FC must be mounted in the vehicle (or at least mounted to each other in the correct orientation).  If not, then the GPS/mag says it is pointing one direction and the FC says another (even just from motion and gyros) and it gets confused.
- It must be mounted with the correct direction forward.
- If it is an I2C aux mag like on a cheap PixHawk GPS/mag, you must set AuxMagSettings.BoardRotation like the wiki tells you to do.

Crazy Attitude (as seen on GCS Flight : PFD / HUD) with an aux mag is usually one of these.

https://librepilot.atlassian.net/wiki/display/LPDOC/Aux+Mag+Setup+and+Calibration
Title: Re: Port Tau Labs Autotune to LP
Post by: chromvis on July 03, 2016, 09:29:53 pm
AuxMag is that "cheap" PixHawk" (although it works on PixFalcon), sturdy mount in correct orientation (Pitch 180).
Mag and GPS is not a big deal - I set them off (complimentary basic mode), I could not find the way to read or replay or anyhow visualize log files (.opl). Gould you give any clues?
Title: Re: Port Tau Labs Autotune to LP
Post by: TheOtherCliff on July 06, 2016, 12:44:14 am
Then you must adjust AuxMagSettings.BoardRotation as described in the wiki.

You play back the OPL file by using the "Connections" drop down (lower left) to select logfile replay and then pressing Connect and it will bring up a file selection dialog.
Title: Re: Port Tau Labs Autotune to LP
Post by: chromvis on July 06, 2016, 07:37:11 am
BoardRotation is OK. I think, I solve this problem, seems to be a combination of neo M8N + mag sensor - I replaced it with old M7N - and calibration. I was using OPLink for calibration (as you recommended somewhere else) but 3 sec stop in each position was not enough. There seems to be significant delay in transmission when using OpLink (e.g. bars on calibration tabs are moving much slower. I had to delay for 10 sec in each position. Copter seems to respond correct in INS13 mode in VelocityRoam, even varying PID with SmoothQuick are OK, although I tested it briefly, just to make sure it fly fine.
Going through this GPS and mag trouble I feel I lost confidence in GPS assisted mode (I similarly lost it for APM before), but today I happen to find "https://forum.librepilot.org/index.php?topic=15.msg38#msg38" - very good text, you should add it into Manual. So I want to make sure copter fly perfectly stable with solid feel and I need to check vibrations, response delay times etc. before going to use GPS and mag.
Hwh already gave me this clue on playback .OPL files, but he mention that there is a bug, not sute what type.
Is it pissible to pause playback? are there any additional controls?
Title: Re: Port Tau Labs Autotune to LP
Post by: TheOtherCliff on July 18, 2016, 06:13:18 am
AutoTune on Nano: Has anyone successfully tuned a Nano with any version of LP AutoTune?  I am having problems with my Nano 330 but not my Sparky2 500.

NANs (not a number) were being generated and making it out to the PIDs.  If that happens, the PIDs in that bank all show as 99.9999.  (The latest code avoids writing the PIDs in that case, but earlier code did write them.)