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

Views: 37061

Reply to This

Replies to This Discussion

I am flying a quad, many reasons to do that.

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

Thanks the great test report, Angel. R5 is working really well for us, too, so glad to hear that it's flying well on different airframes, too. We're going through a last review of the code to weed out some bugs and introduce more error-checking, but the basics seem very sound.  

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!!!

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 LoiterWith a stable platform, the rest of the development will go faster and the only limit is your imagination.

I have compared the Naza and the M with my APM in the frame I called the bathtub. the results were very close on stability. the APM just needs much lighter and smaller prop's to get almost the same result.

Put an 12x6.5 on the DJI stuff and it is all over the place. Horses for courses in my view.

I think it is important to do these tests once in a while just to see where we are.

I have used the 880 engine and 10:3 / 8 props mounted on apm. The balance is not good, I have to do the job of stability for it whole time, I can not take the eyes off it for 2 seconds and requires sticking input all the time. I have 100 flights behind me, and have do every thing for noise reduction.

Arnt-Inge

For sure the more noise coming from your props. the less efficient they are. I have some 14x4.7 APC Slow Flight that I cut down to 9" dia. They are almost silent. Very low aspect ratio, thinned down and rebalanced. Much improved stabilization.

They are hard to beat. and were the basis on which I developed my carbon ultra light design. Avoid high pitch angles with high aspect ratio and any flexible bendy stuff.

I will be receiving my DJI electronics next week and will be installing them in my DroidWorx Hexa and Quad.  Please send some video if you have any recordings of the DJI flights.  I too am still hoping for an autonomous solution from the DIYDrones APM development.

Happy New Year.

Allen

Hi Allen,

 

I posted a video of the DJI WKM in action a little while back, it might interest you to take a look.

 

Regards

 

Martin.

www.buildyourowndrone.co.uk

I will try to do some test flights to night and make video of it. Happy new autonomous year:)

Arnt-Inge: I'm not sure I understand the question. Are you asking what accelerometer sensor is used in APM 1 and 2? (It's an Analog Devices ADX330 in APM 1 and an Invensense MPU-6000 in APM 2).


Or are you asking how the accelerometer is used in the code? It's part of the standard DCM sensor fusion, of course, but we've also done some experiments with using the Z accel in alt-hold. (We now have such a good baro sensor in APM 2 that this doesn't seem necessary)

RSS

Social Networking

Contests

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.

A list of all T3 contests is here

Groups

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service