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.
Here is my flight from today with Ardu 2.2.I had a scary yaw issue when I hit some higher up wind. It seemed like the hexacopter was not able to be controlled.. the wind was not all that bad as you can see in the video. Most of the snow was blown by the prop-wash.
I compiled the video in aftereffects at 1080p but Youtube did the deed on it and it looks pretty bad. View the video in 1080p to try and get the best resolution out of the graph. I did my best to match up the video with the graph plots using after effects.
The top graph is Throttle Input
The middle graph is yaw in (red), throttle in (Green), baro alt (blue)
The bottom is yaw (red), Ch.4 out (green)
This problem has already been reported by many users, unfortunately, happens in a very random, sometimes it turns a quad of 90° or more than 180°.
From what I've found it always happens when the engines are working very hard at high rpm, not in hovering or when the quad is going down.
This problem is absent on the simulator, then most likely depends on a OilPAN sensors or magnetometer, in fact not used with the sim.
I think it's very important that you share your log, I hope you to have retained, could be very useful for the developers.
Observations on flying 2.2b2, stock 3DR, APM 1 board.
I had a lot of flights this morning trying to get a smooth loiter. At times it feels like juggling eggs, and I am no juggler. As I want to end up doing airborne video, I am more interested in smoothness and stability rather than absolute precision. Typically I will be 30-50m up and am not worried about small spaces so I am unlikely to hit anything if the quad wanders a bit. I therefore do not mind if the quad is blown back 10m or so when Loiter is selected so long as it settles down into a relatively smooth flight. In low wind conditions (at ground level at least) I got pretty close to what I was looking for. I am sure there is tons of room for improvement, and I dread to think how it will behave when the winds get up again, but I offer my PIDs up as usual to those who might be struggling with similar kit. The curious thing to me is that my Loiter PIDs are an order of magnitude less than the "standard" firmware upload values. Is that going to bite me at some point? Can anybody explain the disparity?
That's what I was thinking as well. Hmm I will check again, but I am using the relax patch, have the sketchbook folder setup correctly (per wiki), and copied the correct library folder.
Granted, I haven't had much experience with this yet, but I believe I have it set up correctly.
Jonathan, make sure that the libraries folder from within the 2.2b2 release folder is copied into the root of your Arduino sketchbook folder. Cheers, Bill
It all happened pretty fast, but it stayed mostly upright - it certainly managed to travel quite a long way. I don't remember a wobble, but that is not to say that it didn't. Having looked at my last mission, it is certainly possible that my time recording on the previous mission messed up a bit and it did get critically low. Am looking forward to the battery monitor!
This multicopter game is certainly giving me new skills. I now fancy my chances as a surgeon as I deftly thread cables through the crowded PDB space and eliminating sources of error (mostly me!) would be a good characteristic for a detective. If only my 30 parameter juggling skills were up to Covent Garden standards!
Jonathan, this is my procedure everytime I upload a newever version of firmware, maybe it helps :
1 - inside the relaxpatch arduino version, rename the "libraries " to something like "original libraries" (right after unzipping the relaxpatch, before any upload new firmware attempt).
2 - go to the new firmware folder and copy the libraries folder to the relaxpatch folder
3 - go to the "original libraries" folder and copy all the sub folders inside the previous libraries folder you've just copyied from the firmware folder. So now you should have the original libs + the firmware libs all together in a folder called libraries inside the relaxpatch folder
4 - start relaxpatch arduino and at the preferences, select the sketchbook path as the path where you have the new firmware
5 - close arduino and open again (so it can refresh all the paths)
6 - go to the sketchbook and open arducopter project, you should upload without problems, but make sure you have proper board and com port previously set up (atmega 2560)
* Everytime you want to select a different firmware, just erase the libraries folder inside the relaxpatch folder (you should NOT erase the "original libraries" folder), and repeat steps 2 and 3
Hope it may have been some help
I did have wind today, especially at higher altitudes. You could see the quad working against it. Not massive, but it was not still air. I still don't understand the disparity though, unless the "standard" PID settings are for strong winds. If that is the case, then that worries me as it implies retuning for all conditions - nightmare!
Which variables should I be plotting on the graph?
Its not possible to get Aerosim working.....seems my APM is dead....any tries...and dont work. i CANT get the rc signals in aerosim. i see the radios in the MP, on the configuration, can fly in reallife with it. seems to work. but after starting simulation i see wierd signals....
and so on, my aerosim cant get the right things.
whats up with this thingy????
Ah that's what I was missing. Thanks! It works now