Developer

Arducopter 2.2 beta

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

 

 

 

 

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Ok just tested again I am flying apm2 flying stabalize mode 1400gram quad (x5250 standard 850kv jdrones engines + 20a drones esc with 10x4.5 props.

    -Simple mode is defenetly broken.

    -After 5 secs the copter start to lean to the left and will lean more and more to the left the longer you fly

    -Loiter out of 4 times i tried it. 1 time it was really nice other 3 times all over the place

    -Other then these issues it is flying not bad.

    2012-01-14 03-58 9.log

  • Moderator

    Here is the video that I promised from last night. The copter was setup for 2.0.49 and then I started with 2.1 when it was released. Like Marco, I had one of the scary experiences but managed to get it back on the ground without anything broken. I did have a yaw issue previously.

    Last night I loaded up Arducopter 2.2 and configured it. I had no troubles with the config/setup. Keep in mind when watching that there was no tuning involved and this was the stock PID settings. Flying in such an enclosed space also creates much variance in the drafts that the hexacopter experiences, making it stable. I suspect in open air the stability will be greatly improved. The yaw issue I had previously in 2.1 is now absent. The flight is in stabilize mode. In the video, when the copter gets out of the ground effect you can see things smoothing out..

    If you have seen my hexacopter previously you'll note that appears more compact as I have been trying to shrink it's size(height) down. I'm likely going to leave the x468 gimbal off and instead install a jDrones 2-axis one under the floating plate setup.

    Thanks again to everyone for the time involved to get the release completed! I'll have more videos when the wind settles outside.

    Setup:

    APM 2560, 12x3.8's, RCTimer 30a's, mediatek, magnetometer, Maxbotix sonar(still on the fence and needs more testing), Nanotech 5000mah's, Rusty Rev-8 Frame, Rusty's CM-2 Landing Gear, Rusty's new floating camera plate setup.

  • Ok , I've made a test flight in field today, here's my feedback (quad with 2218 930kv motors, 5000 3s 30c lipo, props 12x3.8 slowfly apc, 1500grs). First, all my major Ps were turned to about half (Stabilize P 2.250 (roll and pitch) , Rate P 0.080 (roll and pitch),  Loiter P 1 I 0 ,  Yaw untouched, NAV untouched, Throttle Rate P 0.20, Acro untouched).  APM 1

    Stabilize + Simple = not working, simple did not respond as it should, it looked as if it was "almost" in just stabilize mode

     

    Stabilize = Very stable indeed however, when I want to go forward or backward or sides, it looks like as if it goes by bursts.

    I put my pitch full up, quad tilts forward about 30º as it should, but instead of maitaining that angle, it starts to return

    to neutral position, untill no more forward movement unless I get stick to middle and put it up again.

     

    RTL = did not work at all. I landed, disarmed motors, rearmed (I had gps lock during the entire test and procedure), take off, flew to a 30mts +/- distance in stabilize, engaged RTL... nothing, it even went a bit further away instead of heading to take off position

     

    Loiter = Holded up pretty well but with some drifting (this was a 0km/h wind day, perfect fying condition) Even in circles, it refuses to circle on the same spot, it starts to drift to where it wants, like the olympic games symbol. The strange thing is that, the path it makes while loitering, matches very precisely with the googlemaps, so, this doesn't seem like a gps precision problem, or the path would not match at all. It's like the software it's not correcting errors when they are small and then it can't correct them when they are bigger.

     

    Didn't try any other modes. This tests where made with the 2.2 zip file version available for download

     

     

    2012-01-14 01-44 8.kmz

    2012-01-14 01-44 8.log

    https://storage.ning.com/topology/rest/1.0/file/get/3692335179?profile=original
  • Does anybody know if there is a reason I can't fly 2.2 on my Heli?  I flew 2.1.1r8 in Stabilize and it worked fine, but I haven't been able to follow the recent changes in the code.  I don't think any changes happened to the tradheli specific code.  It's just a question if there's some weird reason the recent changes would adversely affect the heli.  I don't think so, but just checking.

    What is the coldest temp anybody has flown an APM1.4 in?  It's a beautiful day outside, but it's -15C.

  • Developer

    Bad news about Loiter, little props = high rpm = orrible loiter, impossible to tuning.
    Stay tuned for other news...

  • Hi Just came back after flying my Quad it flew beautifully. Tried auto mode and it followed it almost exactly. Stabilize mode works like a charm and it stays rock solid with no drift.

    Have a few issues in Alt Hold and Loiter but i guess its me messing somewhere in the setup as whenever i try to go in either of the modes my quad just shoot upwards towards the sky and i have to switch back into stable and bring it back manually Any ideas where i may be messing it up.

    Config:

    ACM 2.2 via MP 1.1.20

    APM1280

    no Sonar

     Ayush

  • Just flew 2.2 on my Hexa + APM2 - and it flew beautifully. First flight with my APM2 and very pleased. Altitude hold worked well too. I tried loiter, but it flipped into RTL as I don't quite have the current monitor right yet, and it was in 'low battery'. (Voltage is working fine though, with a slight patch to the code). It did head back to launch, but I bailed.

    Simple mode wasn't doing what I expected, so I need to do a bit more work on that (most likely my understanding   of course ;)

    Went for a second battery and the APM2 board wouldn't boot - not sure why yet, maybe its the cold - will look into this - but that aside, flight performance is very pleasing.

    Great work guys!

  • Minor bug found - easily avoided once known. I had loaded a battery and connected through my Xbees. I wanted to change the flight modes so that I had an Acro option. Went through APM Set up (Plane and Quad), went to the modes tab. At this stage I had not armed my motors, but being lazy, I highlighted the option I wanted to change, which was set to Auto, by flicking the switch on my Tx. At this point the quad fired up and tipped over (forwards I think). I rapidly clicked off Auto, so no damage done. I know the advice when doing radio calibration is to unplug the ESCs, but I did not touch the throttle. I suspect that this is one of those scenarios that any sane testing regime would never have reached - one of the benefits of having lots of real world idiots playing with this stuff.

  • Swapped over my boards, so I am now using a stock 3DR with an APM1 board and the new 2.2 code. Just taken it out for a test flight. In Stable, in still air, it definitely had a lean to the right (and my usual frowned upon short cut of using Tx trim did not seem to rectify it). In Loiter, it twitched to roll left every second or so. My presumption is that the Loiter mode is trying to correct for the quad wanting to go right. (BTW, apart from that Loiter looked pretty good except for some altitude variations). After I loaded the code, I levelled the quad, checking it was flat with a builder's bubble level (forgotten the technical term). I will try and dig out the auto level instructions from the Wiki, but any ideas on what might be causing this lean? Cheers, Bill

  • Developer

    Jason, GPS and Autolanding now are ok, anyway please check this, much important: if engage RTL when the mode is Stabilize/Acro, and while I'm mildly rising, the quad continues to rise up while back to home, but instead engages the LAND of share continues to fall.
    In this situation if you put throttle up the command is taken and the quad rise, but if you go "throttle down" is ignored (and quad continues to rise).
    But if you switch to RTL during an altitude hold or while you go down the whole works.

    Same situation in "Auto", engaging "Auto" when the quad rise is not good.. :-)
    This
    is a bug that I had already reported
    , never resolved.
    If you want i create one log in this situation.

    Bests

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…