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 know that a simulator is used on every new release to catch bugs but shouldn't each version be flown through a preset WP including takeoff and landing and using the standard 3DR kit with options like sonar. The path could test various functions like is done already in the simulator. This was we can be sure that all things work like sonar on alt hold, auto landing, function of different flight modes and complicated WP mission and if the same thing is not working for our copters then we know it's something particular to our craft and not the general code.

    I think Jean-Louis and others are taking the place of this but it should really a set complicated mission should fly with success of all functions before being considered releasable.

  • Developer

    I'm at the arifield now for testing R9.
    The first problem is in autoland, touch the ground but with infinite little jump, and in the first test it's impossible to disarm the motors, i follow the jumping quad, taking with my hands (with motors armed, low speed but with rotating props) and disconnect the main power... this is not good! :P
    First i tried to change to another mode, without success, the only way to disarm the motors is remove the power lipo..... :-(
    The sonar it doesn't work fine, removed from the configuration for session of this test.
    Dunno if there's this function but if i put a little throttle when the motors are armed, and the going to zero throttle after 30 seconds there's automatic disarm, like yaw to left... i see because i've led, and going off after 30 seconds... it's normal? :-)

  • Developer

    Here a video of the T3 2 rounds mission competition with the firmware ArduCopter v2.1.1 R9 connected in HIL mode with an APM v1 (APM 2560) board through the Mission Planner v1.1.19. The flight plan follows exactly the T3-2 mission.

    Regards, Jean-Louis

  • 2.1.1.r9 Hill test on AeroSim

    Done a complete round of modes testing, and all is OK.

    Good improvements in height control and auto performance, RTL and AUTOLAND. Need to test in real flight.

  • AeroSIM RC used as HIL - details on internal PID´s

    I´ve got the answer from the developer (Manuel, infor@aerosimrc.com) about internal PID on sim.

    After activating the plug-in, all internal pids continue active. To avoid that the model don´t use it it must be modified the plugin in the folloging sense:

    - from the plugin: write in channels 34,35,36,37 as inputs for motors

    - in the model: chage the motor voltage regulator to input that channels 3 to 37, instead the copter mix like now.

    I don´t know how to do that change in the plugin. Anyone knows who wrote the "plugin_AeroSIMRC.dll"?

    Angel

  • Jason please update what is new in R8 and R9 like you have for earlier version.

  • Developer

    R9 on GIT...

  • Okay, so this code is not ready for us noobs to be using for casual flight.  I let MP upload the latest code (only choice) and now its unstable just sitting on the bench- horizon and compass never settle- x axis gyro twitchy.  I need to back up a few versions apparently. 

    Is GIT the only way to go back to an older version of AC firmware? 

    What branches do I clone ( cloning all of it is an all night DL on this slow connection)? 

    And finally... is there a listing for the latest of stable codes? 

  • Ok, the logs are working for me now.  Well, sort of.  I flew exactly one time, but I ended up with about 10 logs.  Only one of them seems "real". The first 8 have 16 bytes.  There are a few which have a little data, might be when I booted briefly.  Anyway, I got one good one.

    Not a lot to show, other than the fact that my sonar is a bloody mess.  The baro actually looks quite good.  I've got the sonar heated, RC filtered, and shielded wire.  The only thing left is a foam cover, I had one, but took it off on Saturday.  Or, I suspect it's actually vibes.  I need to an anti-vibe mount.  That's my best guess.

    I'm attaching the logs just in case anybody is interested in seeing them from a tradheli with this firmware.

    There is an apparent pitch offset that appears sometimes.  I think that's when I'm on the ground, and the heli sits back on it's skids.  You'll notice whenever it's in the air it looks level.

    2012-01-10 08-26 8.log

    https://storage.ning.com/topology/rest/1.0/file/get/3692332357?profile=original
  • Hi Jason, have uploaded and flown r8, fine but need to try Jean-Louis Naudin's Loiter PID strategy... One question, has camera stabilisation been disabled in r8? My servos went to extremes on power up and complained. Even when I took them off the mount, there was no evidence of inputs for stabilisation. I have looked at Camera.pde, but it looks the same as previous versions. Am using an APM2 board, and  modified my APM_Config.h file accordingly. Or is there a setting in the Configuration tab that I need to change from previous versions? Regards, Bill

This reply was deleted.

Activity