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 Balloon on December 27, 2011 at 5:12am Today, I test on 2.1.1 (Last GIT)
I find problem about lagging control. when i will control in stabilize mode. I move roll angle. after i will move stick to center, but my arducopter don't back move to center (hold roll). it use sometime (about 0.5 sec) to come back center. and sometime it's have problem in pitch angle.
Permalink Reply by afernan on December 27, 2011 at 6:53am I had exactly same problem flying yesterday.
Permalink Reply by Balloon on December 27, 2011 at 7:30am I think it's bug about control in program. Because , I come back .49 it's don't problem.
but I like loiter and ALT HOLD (Barometers only , sonar problem have noise but I used shield cable) in 2.1.1 very stable.
Permalink Reply by nicolas grunbaum on December 27, 2011 at 8:00am Hi Jason and Co, I don't know if it's a problem but I got this when compiling with the latest 2.1.1 from git:
Compiling 'ArduCopter' for 'Arduino Mega 2560'
ArduCopter.cpp.o : In function `test_imu'
ArduCopter.cpp : out of range error
ArduCopter.cpp : out of range error
ArduCopter.cpp : out of range error
ArduCopter.cpp : out of range error
ArduCopter.cpp.o : In function `setup_accel'
ArduCopter.cpp : out of range error
ArduCopter.cpp : out of range error
ArduCopter.cpp.o : In function `erase_logs'
ArduCopter.cpp : out of range error
ArduCopter.cpp : out of range error
FastSerial.cpp.o : out of range error
FastSerial.cpp.o : out of range error
AP_GPS_Auto.cpp.o : init()'
AP_GPS_Auto.cpp : out of range error
AP_GPS_Auto.cpp : out of range error
AP_OpticalFlow_ADNS3080.cpp.o : out of range error
AP_OpticalFlow_ADNS3080.cpp.o : out of range error
AP_OpticalFlow_ADNS3080.cpp.o : out of range error
AP_OpticalFlow_ADNS3080.cpp.o : out of range error
AP_OpticalFlow_ADNS3080.cpp.o : out of range error
Binary sketch size: 140832 bytes (of a 258048 byte maximum) (26.4539023 secs)
Uploading to I/O board using 'COM3'
Done uploading
Will Try anyway.
See what happens.
Permalink Reply by nicolas grunbaum on December 27, 2011 at 8:05am Just tested, can't connect to apm cli send non sense: INIT A all the time.
Permalink Reply by nicolas grunbaum on December 27, 2011 at 8:31am Ok, I just made a small fly and I have to say, WOW! It flies great. I have a PID problem with alt_hold I think but everything else looks really good.
To every one CHEERS AND CONGRATS!

That's the memory error from Arduino. We have a patched version of Arduino on the Wiki downloads site for Ardupilot Mega. That will let you compile programs larger than 128k.
Jason
Permalink Reply by nicolas grunbaum on December 27, 2011 at 2:33pm I had installed that, but I re installed and everything worked ok with arduino, but not with visual studio.

Here a video of an autonomous test flight of the Quad Rotor Observer (QRO) piloted with the ArduCopter firmware v2.1.1 (latest version from today) set in GPS Position Hold (LOITER) done on dec 27, 2011.
Regards, Jean-Louis
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.203 members
24 members
207 members
58 members
1355 members
© 2013 Created by Chris Anderson.
Powered by
