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
Tags:
Permalink Reply by Mark Slater on January 11, 2012 at 1:36pm This is a Quad at the moment - the intention is for it to become an Oct in the future
Permalink Reply by Mark Slater on January 11, 2012 at 1:58pm Ok - I have no idea what is going on here.
I swapped out the RX just to be sure - Same fault so its not that.
I then had the strange idea of running CH5 from one of the RX's and all the other channels from the second RX. Works perfectly - seems the only time the problem occurs is when Ch5 and Ch6 are on the same RX. Freaky - there has to be an explanation.
Radio is Futaba.
Permalink Reply by Don Brooks on January 11, 2012 at 3:32pm Funny servo lead maybe? Sounds to me like a 'Take it all apart and put it back together and see what happens one step at a time' kind of problem.
Permalink Reply by Mark Slater on January 11, 2012 at 4:08pm Thanks to the help of a friend I think I can confirm a problem on Futaba R617 RX's.
Using Spektrum there are no problems.
On Futaba CH6 shows low input when all 7 channels are in use. Remove any channel and no problems are seen (apart from that channel not working obviously)
If you plug the removed channel into a separate RX and run in parallel then everything is ok.
We then tested on the R617 rx using Y cables with servos in all channels. I can confirm that the signals being passed to the ardu are correct. Its only ever CH6 that goes wrong. The Servo on CH6 is moving as expected but the Mission planner shows the channel at 1% permanently.

Ardupilot Mega Planner v1.1.20 with "LAND" mode support is out... thanks Michael!
Permalink Reply by Allen Bishop on January 12, 2012 at 9:39am Marco: Are you saying that autoland is now not a function in MP and will NOT be in the eventual new release? If so - WHY??? This is fundamental. This would be like buying a car that doesn't have reverse.
Allen
Permalink Reply by steve F11music.com on January 12, 2012 at 9:53am out = ready
Permalink Reply by Tobias Krieger on January 11, 2012 at 3:36pm Hi @all
First - fantastic work.
Can somebody give me a hint on how to change the code to get a working TRI-frame (2.1.1r9). Changed in APM_config.h
#define FRAME_CONFIG TRI_FRAME
#define FRAME_ORIENTATION PLUS_FRAME
Compiles nice (mac relax patch) uploading works; CLI:: Setup frame shows "tri +" -> But it does not behave like that (no yaw servo control; single engine starts to run intermittend; some commands in CLI lead to a crash (system not copter). Not possible to use AMP setup to perform "Setup".
And BTW: where can the servo yaw direction be reversed in the code? Yaw servo works as supposed via RC/Arducopter but not when "drifting" is simulated (moves opposite direction as supposed) (used 2.1.alpha to test).
I use APM1.0 with 2560 and the oilpan.
Thanks a lot in advance!
You could try setting negative PI values for the yaw loop. That probably works when you upload the values directly from the planner, but may be broken when re-read from the EEPROM after a power cycle.
At least, it works that way in Arduplane. I guess the runtime PID values are singed integers and they get converted to unsigned somewhere though the EEPROM, resulting in big positive numbers.
The type ambiguities are gradually being fixed in the code base.
Permalink Reply by Bill Jowitt on January 11, 2012 at 4:12pm Observations on flying 2.1.1r9, stock 3DR frame, APM 2.0 board. Did an erase EEPROM, so all settings should have been default. In light winds (just before dusk), Stabilise was fine, Loiter looked smooth, but the quad wandered (18x18m box on one track), RTL did not work at all, camera stabilisation did not work, servos locked into extreme end of range. Is anybody flying recent releases on a similar setup? I have tried Jean-Louis Naudin's PIDs, but those are for his QRO and rendered my 3DR almost unflyable.
I am waiting for the APM 2.0 to arrive.
This board has different sensors and the software will develop a bit different from the oil pan.
I consider that it will take some time for some to find this boards potential.
Permalink Reply by Don Brooks on January 11, 2012 at 9:03pm Just spent a little while playing with R9 in HIL. I like it. Nothing seemed unpredictable, and from reading some of the notes in the code it seems everything is doing what it's intended to do. I really like the climb rate control, instead of lunging upward to the next WP altitude, but it's maybe a little on the conservative side when ascending. I tried it out on the current t3 contest mission, and over 100m distance it can only manage about a 20m increase, and it stopped dutifully at the waypoint until the right altitude was hit, and moved along to the next. Descending is something different altogether, it did descend, but seemed to ignore the altitudes and just move along to the next point instead of waiting.
RTL with channel 7 seemed to work well in all modes, but Failsafe RTL only worked when I was in AUTO. Intentionally causing a failsafe while in stab or loiter modes, it just loiters instead of RTL.
Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.1286 members
87 members
39 members
24 members
5 members
© 2013 Created by Chris Anderson.
Powered by
