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.
Replies
I'm using 2.3 on a 3DR frame with purple motors and 10" props and had an almost crash today. I was pretty high and must have lost signal. Within a couple of seconds it got a signal again and recovered before hitting mother earth :) It was amazing to see how fast it corrected itself from a free fall!
Anyway I thought my failsafe was setup wrong so I checked it out and it seems set up right but it's not doing what it should.
I have a JR9503 Tx and 9ch Rx. I know the way to do the smart failsafe is to pull the binding plug out before doing the final binding step of turning on the Tx. I always put RTL on the mid switch position of my flap which I'm combining with my gear switch to get 6 values.
So I turned on the copter to simulate what happened. Like always I wait for GPS lock and red light not flashing and then armed it. I gave it more than hover throttle and then killed the Tx power. Right away motors stop and I see on the mission planner in the MODE SETUP it go to 1521 which is the value of my switch in RTL mode.
If I use the switch to manually put it in RTL model using the same conditions then I see it act properly. I can feel it trying to fly somewhere even though it's in the home position. I've also activated RTL in the air and it works as expected.
So why are the motors getting killed when connection is lost? It's receiving the correct value that I set when I did the preset failsafe but it just stays in stable mode with zero throttle.
Has anyone else tested the fail safe to see what happens when Tx is turned off?
Great to see all the good tuning work going on in this thread! We need to start fleshing out the Config file repository in the manual for all the common frames. Once you've got good settings for your frame, please save the Config file and post it in this thread so we can review it and put it in the wiki.
ArduCopter V2.3 - Auto Approach (AeroSim):
This video shows a functional alternative, the auto approach.
When engage RTL your quad go to home, once reached very slowly begins to descend, when it reaches the preset height switches to Loiter automatically and wait your tx input... in the video at that point I do a manual safety landing... in my demo I entered "2 meters" of altitude for approach.
You can even integrate doing so that once reached the altitude of approach the quad autoland after a preset time (if you tx is dead).
What do you think?
Bests... Marco
Hi,
i have changed #define AUTO_THROTTLE_HOLD from 1 to 0 compiled and download.
But TRIM_THROTTLE is still changing after each flight.
Cant get Altitude hold to work. Switch to altitude hold and copter start to climb slowly without control.
When I connnect again I find a TRIM_THROTTLE parameter higher than hover point....
Any suggestions?
ArduCopter V2.3 - Stressing the Loiter with high Stab/Rate PID (AeroSim):
Hi all! I made this video to show you how the software reacts to keep the quad in Loiter, just see the right stick on the "stick monitor" at the bottom of the screen (Mode 2).
The wobbles you see are normal, to do this I have exasperated some parameters so that you can see in the "stick monitor" what are the corrections that are given to keep the quad position, of course you see the bounces are due to very high parameters, amplifying the effect is very able to identify what the software does.
Do not look at the windsock, in playback is always in the same position (AeroSim bug) even if you change the wind.
This video shows how the Stab/Rate parameters affect with Loiter, then we can expect a good result just thinking of finding a fair value "Loiter / Nav P", but also to have well set on the quad all the section Stab/Rate P/I/D... certainly, these greatly influence the accuracy of Loiter.
One thing I noticed is that corrections of the software are given in a rather not proportional, fairly dry, sounds bad (imho).
In theory to give a correct command should give for example such a "+10" of correction (stop the wrong drift) followed soon after by a "+5" command maintained for a while (drift to center) and the "0", this would help to quickly stop the quad and give it a softer shift, I hope that Jason has implemented in this way.
I start the video with Loiter in "zero wind", at 00:24 i switch to "strong wind" (when you see the quad that gets up), and at 1:02 again "zero wind" (the quad loses altitude)... always remains no more than 1.5 meters in radius, good result and no circle, considering the whereas variations of wind snapshots are not easy to manage for the quad (yes, the simulator can be done, in reality I do not think, LOL).
Another important note, as I always say, Loiter on the simulator is more precise with a lot of wind.
Consider also that the gps of the sim is absolutely perfect, as our beloved Mediatek sometime makes some sxxt...
Bests, Marco
I am planning to use this code to build a x8 coaxial quad. Has anyone been successful with this config?
I'm off to the Kalahari Desert on the border between South Africa and Botswana tomorrow, taking the quad with too. Did a quick test today with my FPV setup, quality's not very good as it's recorded with the laptop via an analog usb video card but you'll get the idea. This was before some tuning as it's much smoother now but it's dark out. The OSD values are way off too, they need to be reset.
Hopefully v2.4 or v3 will be out when I get back and it'll be "issue-less", cheers
https://www.youtube.com/watch?v=J08tCz-EqYQ
The twitches I'm seeing are there with all D values at zero, the twitches have been there since B2 when I started testing. It's not a wobble or oscillation, it's a twitch, a single random twitch as if one or more motors gets no signal for a fraction of a second, in fact you can hear the motor pitch change for that fraction a of second. But maybe it's my ESC's if no-one else is seeing these.
@ Dave C: I do get the wobbles if Rate_D is 0.008 but not if it's 0.003. Can't feel much difference in flight behaviour between the two.
Important, at the moment do not try to engage RTL at very low altitude (or just disable the Autoland), as a friend has already happened (i'm sorry) that could happen:
-
4
-
5
-
6
-
7
-
8
of 8 Next