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:

http://www.diydrones.com/forum/topics/arducopter-2-1-1-alpha

If you run into any problems please let me know here. If you find a reproducible bug, please add it to the issues list.

tuning tips:

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.)

 

Update 2.2b2

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.

Update 2.2b3

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.

Update 2.2b4

Flew today and saw the WP speed governor wasn't quite working right. It was going down to 0 rather than the minimum.
Made internal switch to CM for distance calcs. This should not make any change to gains or MP.
Modified a few default gains for jDrones frame based on AP test flights of this code in some heavy wind on my roof.
Fixed an issue with the landing code not kicking in right away.
Decreased the slowdown near WPs
Added a limit to the amount the pitch compensation can effect the throttle if the throttle input is really high or maximum

 

Update 2.2b6

This is a rollup of all the code that's been flying around for the last week as well as a few bug fixes. I'll be posting it saturday night after reviewing all of my logs.
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.
I have one small loiter control issue to sort out tonight based on my logs, then I'll post to GIT.
Here is the auto-landing code in action. 

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.

Thanks,

Jason

 

 

 

 

Views: 61048

Reply to This

Replies to This Discussion

To complete this little discussion, you can upload the latest AC PPM encoder firmware and both eliminate this threat and gain CH8 for useful purposes. Download the Arducopter PPM firmware from http://code.google.com/p/ardupilot-mega/downloads/list and follow the instructions at http://code.google.com/p/ardupilot-mega/wiki/Encoder . 

Bill, I had written before the channel 8 is used ONLY if you write the appropriate ArduPPM for Arducopter, damn!!! :-/
I use the ch8 but i've reflashed the ppm encoder with this one with "no CH8 radio passthrough mode":

Here's the video from my test flight today. Too bad I runned out of camera's battery and can't show RTL and Simple problems.

ArduCopter V2.2ß - Loiter and Autolanding test at the airfield

I'm back now from the airfield, impossible to do more testing, very thick fog with visibility not over 15 meters, in soft wind.
In this bad wheather condition my tests have focused about Loiter and Autolanding.
I replaced the propellers in my quad with GWS 9x5 three-bladed (from the kit of X525) because APC 12x3.8 SF are too big for my little motors (you can see this setup in my latest video about Loiter with V2.1.1R10).
Takeoff, some little pid tuning and the quad is perfect still... switch to Loiter... damn, only big circle!

I play with Loiter PID for half an hour, always circles (big, small, random)... the latest value is "Loiter P 0,1" and "Loiter I 0,005", nothing to do, the quad is always in a circle.
So I decide to replace the propeller with EPP 10x4.5 two-bladed, i put the default Loiter PID, takoff... much better now, but always circles, but the result is greatly improved.
With GWS props i'm in hovering at 65% of throttle stick, with EPP is "the perfect 50%".
This means that the size of the propellers affects the Loiter quality about the circles effect.
I conclude by saying that the Loiter, though I do not think that level of code is changed from the R10, unfortunately has worsened considerably,
has nothing to do with my last video (recorded with zero wind):

http://www.youtube.com/watch?feature=player_detailpage&list=UUP...


At this point I ask Jason to restore the loiter of R9 to perform new tests tomorrow, or check the current because form R10 to the latest there's really much difference (and worse).
I believe in all this that the GPS has nothing to do.
Autolanding in the sim is ok, in the reality the quad kissing the ground and drift like my
previous attempts (documented with a video), and I think this greatly affects by the bad Loiter because the effect is generated by the first shot that is not perfectly leveled, and after the first bounce the APM do not understand anything.
About Simple: it doesn't work, there's bug in the code.
Now it's time to test all again with AeroSim... :-)


Bad loiter but without circles, sounds like a GPS error... Manuel, no wind?
About simple now i try in the sim.

Me too, I have the same problem about the Loiter and autolanding with the v22... I am hard-working on the code and do intensive HIL tests about this and also in the field... I have also installed AeroSimRc and also do test in HIL mode...

Stay tuned, Jean-Louis

Hello Marco,

Have you already tested the AUTO mode with AeroSimRC ?... I have just done a simple triangular flight plan for the Aerosim airfield and set the AUTO mode, unfortunately it doesn't work due to the bad GPS datas sent by Aerosim, it works with Xplane v9.70...

I had the same issues with Simple mode. I was also seeing the same behavior when pitching the copter. It would only pitch for so long before it started to try to even itself out. Then I would have to hold the stick there just to keep it level. When I released the stick to center it would eventually level out again.

Thanks to everyone for pointing out that RTFM is always a good idea. I have in fact read the wiki (is there any other manual?) backwards and forwards many times hunting for information, but that one slipped past me (a single bullet point). There is nothing like learning from experience!

Bill

Auto mode for me work fine if is planned, not if you record waypoint with the CH7.
Try this mission in AeroSim, airfield "Island"... set the WP radius to "5" or "10" meters, i fly with "2 m/s".

Attachments:

No Marco, 0 km/h wind ! I've excluded GPS error since the path shown in my kmz file with google earth, it's exactlly the path it did in the real world, with a precision I would say, of about 1 - 2 mts.

So I think is something to do with error correction. I had Loiter I at 0 since there was no wind, but still, it didn't maitained position.

Great photo Marco, I'll steal it to my background with your permission !

Reply to Discussion

RSS

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service