Jason is travelling this week, so I'll take the helm for the next software release post.
UPDATE: the motor remapping thing was confusing everyone, so we took that out and returned to the regular motor mapping. That means that APM 2 users with Hexas and Octos should wait for the next version. APM 1 users should be fine with any frame.
NOTE: Hexa and Octo users: there have been motor mapping changes that may affect you. Please don't upgrade until we can update the documentation to reflect the changes. This should happen by the end of the day today (Feb 1).
ArduCopter 2.3 is now available in the Mission Planner. This is the next revision of the ArduCopter 2.2B6 code, which is perhaps the most tested code we've ever released (1288 comments in the thread!) and certainly in my experience the best code, too.
The default PIDs are optimized for a 3DR/Jdrones quad with 850 motors and 10" props. If you're using more powerful motors/props, start by turning down Rate Roll P (default is 0.14, so start by turning it down to 0.1. In general tune PIDs in 25% steps).
Now that we've got solid code out there, we can turn to collecting suggested gains for standard frames, and a better guide to how to tune PIDs for your unique setups.
Here are Jason's note on the latest changes (mostly from 2.2B6)
A dampening term called STAB_D has been refined. A D term for all of the Rate based control loops has been added based on Igor's work. Landing for Baro and Sonar has been refined based on JLN's work. A slightly new approach to Loiter and Navigation is being used to try and linearize the pitch and roll for rate control. It tends to use lower gains, yet has a more assertive response in the air.
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.
Note the Mission Planner does not yet highlight these D terms on the main tuning page (it will soon), but you can find them and modify them on in the Parameters list.
Autolanding should now work well (see video above) and the Tri servo issue is now resolved.
The code should now compile with Arduino 1.0 (thank, Randy!), but remember that you need to use the "relaxpatch" version of Arduino in our downloads section.
[Update: we've reverted the below. See update at the top of the post]
Important for Octo users:
We've changed some of the motor orders for some more exotic airframes. We'll be updating the docs on the Wiki in a day or two to reflect this. Pat Hickey explains:
As before, the hexa plus APM2 motor setup has changed from the ordering [1, 2, 3, 4, 5, 6] to [ 5, 6, 1, 2, 3, 4 ].
The Octa V layout for APM2 is:6 42 58 13 7Motors 1 through 4 spin clockwise, and 5 through 8 spin counterclockwise.
Marco Ive done some rework on my frame and fixed some tilted motors so tomorrow Ill take it for a run. Can you please look at my settings and recommend anything I should change?
I suggest you wait for 2.3.1, which I think will be shortly released, and you you want change your X8 motors respecting the new connections, I've already done with mine.
Obviously if you want to continue using it as a "X QUAD" with esc in parallel mode do not do anything about this.
Marco Whats the main advantage to have the 8 motors independently controlled? I suppose one advantage is the top and bottom speeds can be different now to help counter the wash the bottom props sit in? The mods to change it over will take me a bit of time so for now Ill leave it as a XQuad for tomorrows test flights. Will 2.3.1 be out today? Im GMT+8
There are several improvements on 2.3.1, I suggest you wait for the release, we're completing the tests, i hope likely in the evening.
Yes, the advantage is the top and bottom different speeds, could improve flight attitude and yaw control, but you're not obligated to do so.
yes I'm very interested in that Marco. Openpilot has had this for a while as well and from what I have read on their forum is to set the top motors at about 93 to 95% speed of the bottom motors give much improved lift and control. Also some were using different size props and teaks of the speeds to improve the performance and also to remove vibration.
Angel, there's a little error in your doc, in config.h "LOI__IMAX" with double underscore... :-)
Angel, some reports from AeroSim: the pid for loiter work fine, but anyway all the stabilization and rate pid however affect the loiter, try to greatly increase Stab P and you realize right away, is not really separate.
Sure that affects, since I didn´t change the global logic of 2.3. I´ve only separated the pid parameters of the loiter "pid" control loop part. That´s it.
The way the copter is stabilized inside loiter is still the same than 2.3, controlled by the stabilize part of the code (it could be done also an specific "stab code" for when in loiter, but maybe that´s too much...)
Thanks, Marco, for your comments.
Hi all, here are my two cents on the new version.
First of all, ESC's really do not like cold weather (-15 °C, west germany), so I had to recalibrate them to get my quad up in the air.
I did 3 short test flights. First one was with "old" 2.2b6, default settings, second with v2.3 default, third with v2.3 and the settings Thomas uploaded.
Summary: v2.3 is definitively way more stable than 2.2 in stab mode. (3DR frame, 850kv motors, 10x4,5 props, 2650 3S)
Default 2.3 settings are good, really good. Nice response, smooth control, just as one is flying with a good old friend, I noticed the small twitches during hover.
Thomas' 2.3 settings are nearly perfect (for me). This is flying with a good old friend who knows my intentions without the need to speak them out loud, no twitches but a little crackling noise from the motors.
Thomas: could you please re-upload your settings WITHOUT the "modes-settings" for CH5? Aftert uploading your params I nearly crashed the quad because I didn't realised my flying modes changed! I know, my fault, but no need to have extra risks for other users...
Dave: could you upload your 2 settings (the moderate one and the "flying beast") so users can test them on their own?
Another side note: my yaw-not-responding-issue has dissapeared with v2.3! Before those test flights, i resoldered all the pins from RX to APM, without effect when using v2.2. In v2.3 i have perfect yaw-control all over the time.
Guys, you are doing a great job, please keep on going just u are doing right now!
My 'default' settings are just as provided by MP, but with slightly reduced stab_P (4.1 instead of 4.5) and slightly reduced rate_P,(1.3 instead of 1.4) This is, IMO, is perfect for my stock ardu setup for normal, very smooth, flight.
My 'beast' settings are attached, but please be aware that this has rate_d of 0.01, that make cause the initial 5 second wobble if you haven't got the firmware with the 'anti wobble' mod enabled - see earlier in this thread.
Also this high rate_D may cause 'twitching' inflight, if so reduce the rate_d until this twitch disappears.
Also please be aware that these 'beast' settings have very high rate_p and stab_p values, which may need reducing for your first tests and also have NOT been tuned for loiter or nav yet. Work has got in the way of my testing this week.
Anyway, good luck, let us know how you fair (i would do a few hand tests first ;))
Hey Dave, THANK YOU!!!
I just did a quick indoor test with your "beast" settings. This setting has something from reptile-dna inside. VERY responsive - but still under control. Can't wait to ramp up some speed tomorrow with this settings in free space. I even could imagine a combination of acro/stab mode with this settings. Still stabilized and self-leveling, but with the ability to do loops and rolls... What's your challange today?
But: those settings are for sure not for everyday use - at least for me.
What about building a new functionality for CH7 or CH5: selecting different PID settings in-flight?
This would be great for FPV/video, start with smooth settings to relax in free space and change to agressive settings to challange some tricky maneuvers through obstacles.
Side note: I have to balance props and look for better prop mounts, the stock ones shiver like they catched a cold...
I left my laptop in the garage yesterday and now it refuses to run on battery! This is pure technique fighting against pure arctic weather!
Anyway, I will take my copter for a quick run on the field with Dave's "beast" settings and see how it performs. At least my GoPro has a built in heating so it hopefully won't stop working!