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:
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.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
Replies
Marco, can u share ur plugin of the Aero-SIMRC ?
Some things have come up in testing that really warrant some rigorous testing. I think R5 is OK, but I would be extra careful and I would not fly Acro on it yet. It may be a week or two of testing and reviewing code before we can release the next version.
Jason
Today I am going test my new Hexa DJI wookong, I will compare it with Hexa apm and come up with constructive elements so that one day I can use my 2 x apm1 and 1x apm2 in a stable multicopter. I asked what accelometeret be used to in apm, but has not been answered?
I have seen in multiple feedback here that the stability is preferred overall before a working Loiter. With a stable platform, the rest of the development will go faster and the only limit is your imagination.
I want to wish all the Ardupilot/Arducopter users and the dev team a Happy New Year.
Lots of Arducopter flying without crashes in 2012!!!
Flight test 2.1.1. r5 on strong wind
Just came doing my first ´12 exciting flight to clean up some alcohol from my brain.
Wind was really hard and gusty (20knt+), but my small pretty copter won the battle thanx to the very good last r5 code (deffault PIDs).
It could stay several minutes under loiter (in heigth) without a single stick touch.
Gusts are really well negotiated. No circling nor divergences.
Only a small bug: I´ve got 258 empty logs (?).
So I do belive we are in the good way.
¡Feliz Año Nuevo!
Angel
I think my contribution to the progress of the code dev. is very limited as there are some people here who are so far ahead of my understanding that it is pointless to even try. What I can offer is some info as to what the direction of future multirotor stabilization might be headed. We know that the ESC's pwm refresh rate is quite an important factor in dealing with the effects of wind turbulence. But more powerful is the way in which the motor is matched to the ESC. Quite dramatic effects can be seen with the timing settings. I recently had a motor shut down in mid flight due to the low timing setting of the ESC not being optimized for the low 600 Kv. motor. It needed a high setting to work efficiently. My work has centered around the motor prop. combination and some quite interesting facts have emerged. To sum up in a few words I would say that the larger the distance between the motors the further the pid settings stray from the ideal. The larger the prop. and the heavier the prop. then the worse things get. Low Kv. motors produce a faster response if matched to the ideal pitch angle. Importantly the dia. should be matched to the payload as it is important to keep the RPM's high in the descent. i.e. keep it as small as is required to make an efficient lift. I have come to use prop. dia. as an effective means to buffer the effects of turbulence. Just my 2 cents worth. The props. that I have developed for this task are 11x4 and weigh only 14 grams. they are very thin and are autoclaved in carbon prepreg. they are designed so that they can be cut down to match the weight of the model. I looked at insect technology to derive the section and surface finish in a world where reynolds numbers are meaningless.
Sorry, sorry, sorry...
The post I´ve put 6h ago with a flight with bad performance was wrong, and It was my fault (I´ve deleted already that post).
The problem was I´ve put a wrong declination value (again an error between "dots" and "comma"). I notice after the flight.
Now I´ve just flown 5 batteries under 15knt wind with strong gusts and it was really GOOD (with 2.1.1. r4). None circles at all and stabilize has really improved. Used defauls on a light quad (650gr with batt). Impresive improvement. I think it can be put on the MP already.
The behaviour was really similar to the HIL prediction.
Angel
R4 is on GIT, thanks Jason for your hard work about some comparation with a big MK Octo like mine (i think is the same, Droidworks carbon frame)... :P
Well, Trad.Heli HIL testing of r3 did not go well. The heli rises off the ground about 5 feet. I input pitch forward just a touch, and the heli immediately flips completely over and piles into the ground upsidedown. Nothing I can do to stop it.
I don't know if this is problem with my HIL setup (first time I've done it) or if it's a problem with r3. I'm off to bed. I'll try HIL on an older version tomorrow.
I'm trying to download the r3 version using GIT but... not having much luck. I tried to update the GIT on my hard drive, and it comes in as 2.0.50 and I can't get it to merge in any case. I am reading the GIT wiki (http://code.google.com/p/ardupilot-mega/wiki/Git is there something else I should be reading?) and it's just not working. These pages seem to be written for people who already know what they're doing. Or something. :(