Developer

Arducopter 2.1.1 alpha

This is a work in progress. I've tried to address some fine tuning and performance issues.

Denny R. had made a comment about the inertia of bigger props causing issues. I've added a low pass filter to smooth the positive acceleration of the props to see if we can get at this issue. It may require tuning up Rate_P for a few folks, but I saw little issue in multiple flights.

Crosstrack had a small math error that decreased the resolution of it. I've fixed that and upped the default gains to get better tracking. 

Made WP hit radius 1 by default. even 3m is too much for quads. (If you pass a WP you will move on to the next)

The Loiter method is tuned a little better by default, and now uses GPS offsets when flying less than 1.5m/s. Code experimentation will continue on this front. Thanks to Emile and afernan for their help!

A fix in the Z Accel startup was added to get an averaged result.

Added the ability to enter Loiter with Optflow enabled. - still a work in progress, not for everyday use just yet.

This alpha is on GIT now and is for user's who want to test code. As always, you need to use the "relaxpatch" version of Arduino you can find in the downloads section

Update: We've found and patched some small type bugs in the latest and updated some GPS drivers in the Library. Be sure to pull the latest code and check http://apm.tridgell.net/ for the status of each build run against the SIL sim server.

Update r3:

I pushed a version on to GIT that addresses a number of issues.

- the low speed GPS XY calculations were incorrect and have been fixed

- Nav_Rate I term has been removed in loiter control - it's too easy to get two iterms working out of phase

- A second derivative has been added to Roll and Pitch. I found it removed wobbles nicely - Can be adjusted in the planner as STAB_D with a default of .25 (just enough)

- Smoothing has been applied to the motor commands in a way that really quiets down the alt hold pulsing without much effect on latency

- Yaw now has a dynamic constraint and I've upped the yaw gain.

- The motors output now have an LP filter on them so that the accelerate just a tad slower than the deceleration. This is a test to see if it helps big Octo's and Hexa's

- The Rate_I term is now zero'd for first five seconds after takeoff to keep balance.

- Loiter gains are lightened up a bit

- Nav_Rate_P is lower to remove back and forth sped related hunting in loiter

- Compass is enabled by default

- New I2C Library now included which should solve I2C related lockouts

- optflow is still a work in progress.

Update R4:

This update is based on flights today in a very windy environment.

It occurred to me that we're handling the WP nav I terms incorrectly and I reworked the WP navigation to share the same I terms from the Loiter. Even though they use different error input, etc, they turn out to both deal with wind in the same way. I have not Flown WPs with this new code, but heavily tested it in the sim and It's really rocking in hard wind. Transitions from Loiter flight and Nav flight are very smooth. Please let me know if you have luck.

Update R5:

This is a quick patch based on a bad crash Marco had. My theory was an I term that built up during wind that needed to be reset, but wasn't. It's a corner case but It bit Marco pretty bad. Please re-pull if you have R4 running to go to R5. And please, please be careful. This is alpha code not for general testing, but for development. Don't fly it on anything you would feel bad about crashing. 

Jason

Update R6:

Includes fix for Acro mode reset bug.
I went through all of the global variables and gave them lengthy descriptions. It's worth a read if you want to learn more how the internals work. I'll be doing some more organization like this as we move forward with an architectural redesign for 3.0 \
This version is mostly clean-up, but does include 1 interesting performance enhancement. It's disabled by default because It's fairly untested. The idea is that the wind compensation created by the Iterms for lat and lon in Loiter and Navigation are carried over into Stabilize. This unifies all of the modes so that when you switch modes, you don't get a small, but fast change in pitch or roll. This is only noticeable in high wind environment. 
To get this to work, I look for near zero velocity and start moving the pitch and roll into the wind control items. This takes a  transformation from copter frame to world frame, but the result is the copter will hold the position against the wind with the sticks in the center of the controller. If you fly around the wind compensation will bleed off slowly - about 30 seconds.
Again, this is off by default and needs significant testing, preferably in the HIL sim first.JNL has already started and flown this version for real.
The feature may be off by default for another version or two, but just letting you know it's there.
I think it will go a long way to making the mode changes feel seamless.

Update R7:

Added an auto-land timer for RTL. If you don't change modes for 20s after the copter arrives at home, it will begin to auto-land. If you have failsafe and no GPS, you will immediately begin auto-landing.
Failsafe RTL now goes 10M up as it RTLs to avoid obstructions.
Added SIL test for failsafe. 

Update R8:

Minor tweaks and cleanup

Update R9:

Made climb rate controller for landing universal for all altitude changes

Update R10:

Updated Loiter controller - Works great in the sim, thanks Afernan.

Thanks,

Jason

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

Join diydrones

Email me when people reply –

Replies

  • I'm having problems with althold. The sonar works correct in MP and also the CLI test.

    But when activated in flight it just goes up and down.

    Is the sonar info desabled??

  • Hello, (yes i know thats a develope corner but...) 

    i have a problem,if i engage the loiter mode my copter bank´s left forward and fly to this direction, i am not man enough to wait until a steering singnal. so i can not use the loiter mode. gps signal seems good and strength.

    thanks a lot

  • Developer

    Here a video of true flight with my quadcopter controlled by the ArduCopter v2.1.1 R8 firmware. The video shows two kind of tests that I have conducted, the first part of the video is a long duration LOITER test with a wind of 11 Km/h, the second part is a full RTL and with an AUTO-LANDING...

    The AUTO-LANDING descent has worked exactly as in the HIL simulation with X-Plane. There is a weak difference during the touchdown: when the quad has been a contact with the ground, It has bounced a bit due to the wind gusts and the ground effect, so I have need to set the throttle to 0. I shall update the code for improving the final touchdown so as to get a kiss landing... Stay tuned...

    Regards, Jean-Louis

  • Jason, do you have release notes on r8?

  • Developer

    Here a simple test of the RTL + AUTO LANDING mode with the firmware ArduCopter v2.1.1 R8 set in HIL mode on Xplane v9.70 through the APM Mission Planner. When the RTL (Return To Launch) is activated by the pilot (or here in this test by a script sent on the ground station), the quadcopter return itself above the landing point, wait 20 sec, then LAND automaticaly. The motors are stopped by the pilot (or by the script in this test).

    Regards, Jean-Louis

  • Has anybody figured out how to fix the logging system?  I don't know what the problem is, but I downloaded my logs from today and I've got *nothing*.  Nothing at all.  Says bad data or something.  The files are 1-5 Kb.  

    My logs from yesterday weren't great either.  Not much usable data.  At least not that I can figure out.  But at least I got something.  Now I have nothing.

    I was really hoping I could see the data on my sonar and baro to see how clean or dirty it is.  I'm just tuning blindly at this point. 

  • I am surprised that you made Aerosim tests without knowing the layer of the autopilot control of it.

    Finally we end up with, I do not know what? A hardware controller following a software controller!

    I think it is not serious testing method.

    Finally it's simply good  for practicing  for making flight plan & RTL.

    Is there someone knowing as well Aerosim on this forum as Jean-Louis Naudin  know X-Plane with all the documented material that he produce?

     

    Guy

  • Git repo is working again.  Just updated to latest code.

    DIYdrones APM2 pre-order is not available?   I tried to add one to my cart and got:

    • Whoops! Our apologies, but although this product is listed as in stock, there is actually one component (1x01 Pin Header) that we don't have in hand

    1x01 pin header?   I've got plenty in my drawer .. can you re-enable the item in the store?

  • Just got back from flying 2 packs (~30 min) with 2.0.1r8 Spec V Type R Special Edition ;)  downloaded from download section on my Heli.

    Went pretty well.  I had some trouble with the yaw control, but that was a mixture of a mechanical setup problem and tuning.  Once I sorted that it was much better.  I have noticed something with the yaw, where, if I have it hovering, hands off the rudder, it's rock solid, dialed in.  As soon as I touch the rudder to move the nose, there's a quick jump of the nose, real slow, and then it stops.  When I release the rudder, it seems like it takes a second to stabilize.  Do you guys see this with the quads?  I'm not sure you would as it's really quick and you don't have as much yaw authority.  I think what might be happening is the Nav I term resets to zero as soon as you touch the rudder stick?  So the built up I term disappears and the servo moves until the Rate PI system catches it.

    Need to check that.

    I tried Alt_Hold, much better than I've had before (the last I used was 2.0.55).  No more jumping up and down.  It did wander quite a bit, but I think that's just a tuning issue.

    I tried Loiter briefly, but I just don't have the nerve to let it wander around and see what it does yet.  Once I have more confidence I'll work on that.  Well it would help if the Alt_Hold was solid so that I would know it's not going to crash into the ground.

    Anyway, quite successful I'd say.

    I did have the same problem others have reported where towards the end of the second pack, it was leaning quite heavily to the right.  I was using quite a bit of right stick trying to keep it level.  I tried arming and disarming a few times, that didn't help.  I rebooted and armed.  Still didn't work.  I even used the setup to relevel, and that didn't work.  I don't get it.

    When it's stooling up for takeoff on the ground it's fine.  Soon as I take off, it seems like the lean to the right works itself in.  If I land, skids flat on the ground, and release the stick, it wants to tip over.  If I hold it down for a while, it straightens out. Soon as I take off again, it starts leaning right.

    I don't get it?

    I do have fairly bad vibes, I have to look into that problem.  I wonder if it's doing something to the gyro.

  • Developer

    ArduCopter V2.1.1R8 - AUTOLANDING FAILURE


    This is the video about "R8 autolanding test failure" with AeroSim RC, when the quad is about to one feet off the ground the flight status changes alone from "unknown (LAND)" to "Stabilize" and begins to gain altitude indefinitely.
    The throttle stick as you can see from the values in the planner is perfectly in the center (1520), i only switch to "RTL" at the begin of the clip.


This reply was deleted.

Activity