I just pushed Arducopter 2.2 to the Mission planner. This version went through extensive testing by a brave group of flyers and with both HIL and SIL testing.
See this link for more:
If you run into any problems please let me know here. If you find a reproducible bug, please add it to the issues list.
If you run into Loiter issues, try adjusting LOITER_P. It's 2.0 right now which may or may not be to aggressive for your copter. Nav is no longer used in Loiter control, which should make tuning easier.
If you run into a circling issue, try lowering LOITER_I to 0 and see if it goes away. If not, check your compass declination. A negative error will produce CCW rotations, a positive error CW.
If you have issues with alt hold, try lowering your THROTTLE_P, it may be too high for higher thrust copters.
If you have wobbles and can't seem to get rid of them, there is a new term called STAB_D, which is a derivative term used to tune out the wobbles. You can increase it until they stop, but just like driving a cadillac, you loose some performance and handling. In the CLI "tune 16" in setup will let you control this in flight, and "tune" in test menu will let you see the value printed out interactively before flight. See the wiki for more detail.
Many testers gave me a thumbs up on the code, so if you have an issues please post the flash log from the copter. The tLog isn't that much help to me for debugging as it doesn't capture the needed values at high enough rates.
(Remember, if you'd rather pull the code from the repository and load it with Arduino, you must use the "relaxpatch" version of Arduino in our downloads section.)
I believe I found the simple mode error. It was a bug that was working OK until Tridge fixed it so it was declared properly. Then the bug became active. I made the Simple mode function internal variables static and this should fix it hopefully.
I updated alt hold to not use dampener for now until we get more testing. Some folks saw a latency induced oscillation which was pumped up by the D term.
I added the automatic throttle cruise or hold value as a compile time option for testers. This basically looks at your throttle and climb rate while in stabilize or acro and determines your optimal hover value. This means you can enter any autopilot mode and not have to worry about your throttle position. It should make alt hold more reliable if it works. This is off by default until we get good field tests back.
Update pushed to GIT.
Just some refinements. I added JLN's throttle curve mod for landing. Hopefully that's correctly implemented.
Made the landing delay from RTL user settable
removed the ADC gyro filter, I was doing a lot of testing and determined it wasn't worth it.
Enabled the auto-throttle control by default. Please test in the sim
Altitude no longer resets when flying in Loiter mode
Pitch and roll dampening is smoother now. try values up to .08 for very dampened flight.
Mavlink can now trigger auto-land
I'll push a hex when I hear some good news from HIL testers.
OK, 2.2b6 is on GIT. The Mission planner is going to be out of sync until the release code. until then you can use the APM_Config.h or the parameters list in the Mission planner.
STAB_D : This is the gyro accretion dampener. This can remove small wobbles during sharp changes in angle commands. Making this too high can have a negative effect in performance and add a memory effect that can cause temporary loss in control. The in flight tuning is ranged so you are just below that effect.
If you haven't noticed before the control loops are in two stages. The first is a PI stage that converts some sort of position or angle error into a desired rate. These generally do not need to be tuned. They are more of a user preference on how fast you want the copter to perform a motion.
The second stage is the actual PID loop that needs to be tuned for the copter. This converts the desired rate into a motor command of some sort. I added a D term based on Igor's recommendation to the PI's for each rate controller. These should show up soon in the mission planner for the release. I cannot give you a concrete answer for how to tune the D terms, because they each depend on their function such as alt hold or loiter, etc.
Still, the absolute most important term is always the Rate_P term for each loop. Start tuning here.
The default PIDs are in the what flies great for a stock jDrones/3DR Quad with the purple motors in X mode.
Except it is the windows 1.0 relax patch...
I've seen a few threads with people trying to use the 1.0 relax instead of the 0022. It shouldn't be in the downloads section here if it's not supported by the code, all it creates is confusion.
Yep. After messing around a while I succeded to compile and upload with 022relax.
And I agree very much that offering 0100relax in our dowload section sure seems like an invitiation to use it.
And the download info text, well... quote:
"Arduino 1.0for Windows, patched with --relax option for correct compilation of ArduPlane and ArduCopter for ATMega2560"
Anyway, thanks guys.
Andrew: thanks for the heads up on that. We'll incorporate that in the release candidate code going out in the next few days.
(The baro is so good on APM 2 we haven't been flying with sonar, so apols for missing that.)
Hi Tomas, I don't have sonar, I use only the onboard baro, its still sufficient with the APM 2
Ok, thanks for reply JL.
It is really pleasing that the new baro sensor is performing so good together with our algorithms.
Still, there are flight situations where a good working sonar will allow us to do some very cool flying!
So don´t abandon the sonar, comrades ;-)
I have been off this forum for a few days so was pleasantly surprised to see that Mission Planner was now pushing out 2.2b4. Gave it a go today - quite windy but it certainly looked an improvement. Once again though I found that the defaults produced big circling loiters - moreover, I am now thoroughly confused as to how to tune this firmware. What is the relationship between P, I and D terms? What are they supposed to do now? What is the relationship between Rate, Stab and Loiter terms? Does anybody have some good working PIDs for a stock 3DR? Any swift help appreciated as it looks as if winds will be less than 10mph tomorrow morning. Thanks, Bill
Below the PID that I have used successfully during my long duration LOITER test with the APM v2 and the firmware v2.2 B4xp1.
PS: there is an important parameter to tune this is the STAB_D which must be lower than the default value...
I hope this help...
Jean-Louis, thanks for that. I will give them a go tomorrow I hope. Regards, Bill
Im just curious JL why the PID settings you have are so far off from the default settings and less than half?
Because my quad is smaller in size that the Jason's Quad and also I use low Kv motors (750 Kv) and big propellers (12 x 4.5).
Hi Jean-Louis, I think I need to try this on your B4xp1. I had a go on 2.2b4 in medium winds this morning, not very successfully I have to say. Were these for your 450? (It looks similar to the 3DR in size at least). What Loiter D are you using? In fact, would it be possible to post your parameters as a text file as you did for your AeroSim instructions? Thanks, Bill