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

  • Developer

    Here a video about a test of the firmware ArduCopter v2.2 b2xp (JLN updated) on RTL and AUTO LAND features. Test done with a quadcopter model in HIL mode with AeroSIM-RC and an ArduMega 2560 (APM1) through the APM mission planner v1.1.20. Now, the AUTO LAND feature after the RTL works very well in the simulation with AeroSIM-RC, kiss landing and no bouncing...

    Regards, Jean-Louis

  • Developer

    Hi all! Today i tested Loiter with AC V2.2b2... not good vs the Loiter of my latest video with V2.1.1R10.
    I suspect that having moved to the gps routines in the fast loop it is only made worse.
    I had to set the Loiter PID to "P = 0.1 / I = 0.01" (too low value) for a minimum of precision or created the usual circles, but often moves 5 or 6 meters without going back to its original position, and it does so randomly.
    I have the feeling that instead of going forward we are going back with Loiter, I hope that Jason fix this thing soon, and i'm waiting the test of JL in the reality, Afernan has already expressed.
    The control of the yaw is not great, it is often jerky, especially when the command is issued, I played with the pid but nothing to do, is not a pid problem, sometime is too jerky in blocked shots (often bounces) or sleeping too, I do not like it at all.
    The funny thing is that I have tried a KK Multicopter board and the yaw control will do a better, and we're talking about a small Atmel168.
    The autolanding still does not work, if it is better to operate in that way eliminate.
    Everything else seems to be fine, but there are still many things that need to be arranged to achieve a quality standard like other systems.
    Today I did not make any videos because it was not worth the effort.
    Wait for better times ... :-)

    Bests...


    Marco

  • Hi works well thank you for the hard work! but on short question, the "auto throttle hover function" is these enable or disable by default? i can´t notice a change.

    thanks a lot

    Sven

  • test flown today with apm2. I have the problem that in the begincopter is level. then it will start to lean more and more forwards untill even pulling full backmthe copter doesnt get level anymore. any ideas onwhat this could be? for the rest stable mode is verry stable alt hold also performs nice. How tomsolvw this leaning?

  • Loaded the latest code via MP onto my 1280 standard quad.

    Terminal reports V2.2.

    Even stored a mission of 4 waypoints.

    Thanks to the developers for still supporting the 1280 !

    Unfortunately the wind is blowing a gale here, but I did lift it up and flew a bit in Stabilise.

    Very turbulent in the garden here, but the quad handled quite comfortable.

    Here's hoping to no wind tomorrow morning !

  • Sorry for my stupid question, but HOW can i get the Aerosim working with Siumulating of APM?

    I downloaded the dll soon, i put it in the Aerosim Plugin Folder. Startet MP, loaded the 2.2HIL in the APM. Calibrated radio and setup the APM. Then i connected the MP to the APM and startet simulation. With Heli Box checked. Then i did some wps and saved them to the APM. Now i would start my virtual copter in Aerosim. Started the Plugin APMHIL and tried to arm my virtual copter, but my radio isnt responding. my radio is connectet with sumsignal and bridged signal pin 2 and 3 of the inputs.

    i didnt get it to work. plz help me, i would help in testing some code, but i didnt get it to work. has anyone a tutorial, how it works? i worked within the wiki, but it didnt help me.

    need i  a new dll? or another things?

  • Flight test (real) on 2.2b
    ___________________________

    Used GIT version
    Simple mode: OK. Problem solved

    Auto throttle activated. It works pretty well for me. Alt-hold is better stabilized than before. Good work in this line.

    Loiter. (no wind).
    Good enough, but still can be improved. Needed some tunning. For my small quad i used loiter_P= 1.5 and Loiter_I=0.01. I increased also D factor ( inside code) from 3 to 4. Also D cnstraint from 500 to 600 in order to increase the damping. It worked in the right sense. I'll continue testing more D changes.

    Autoland.
    Dont worked at the end. After touching ground motors still pulling. Need to stop manually. Something to improve.

    Auto tested. Worked well always.

    In general. A good version.

    Angel
  • Trying to upload 2.2b2 through Arduino, relaxpatch 0022, have the following error:

    3692335929?profile=originalOn a very brief peruse, I cannot find where the compass is defined. Would be grateful for guidance at this stage. Thanks, Bill

  • Developer

    Here a video of the firmware ArduCopter v2.2b2xp (with some JLN updates) tested in HIL simulation on the AeroSIM-RC simulator connected on an ArduMega 2560 board (APM v1) through the APM mission planner v1.1.20.

    I have added some personnal improvements on the AUTO LANDING method and some others additional features.

    A flight plan have been stored in the eeprom of the APM, then the AUTO mode is started and the flight plan is launched:

    - Auto TakeOff,

    - full autonomous navigation (3 WPs),

    - Auto Landing.

    Regards, Jean-Louis

     

  • Jason, any explanation why while in stabilize pushing pitch forward the quad leans to accelerate but after about 20mts starts to loose pitch (and speed) and returning to neutral position ? Adam Rivera was having the same issue, I don't know if anyone else had it or noticed it. If you do small radius flights in stabilize you don't get this since it's a small distance, but if you try to take the quad for a straight line pitching forward, let's say for 20 - 50 mts, I believe you'll notice it starts to loose pitch and speed and returning to neutral position (even with the stick fully pitching front).

This reply was deleted.

Activity

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