Developer

ACRO for ArduPilot 3.1

3689532793?profile=original

Hi all,

My motivation to get involved in the development team was to bring a good ACRO mode to ArduCopter. Three or four months ago Robert Lefebvre suggested that we could integrate the rate error and use it to correct the platform in the body frame. He went on to demonstrate this on Heli's. We have since learned that MultiWii use a similar approach and code was developed by Bob Dorion based on MultiWii and discussed here http://www.diydrones.com/forum/topics/flipping-arducopter.

I have taken Robert's approach and integrated it with the current ACRO trainer aids with the help of Robert and Bob. Here is the result:

ArduCopterACRO.zip

This code is based on ArduCopter 3.01rc1 so if you haven't got this flying yet, don't bother with this code.

Changes:

Replace Earth Frame ACRO with Body Frame ACRO

Reduce the dead band on the roll and pitch inputs

In the same way as you could before you can disable all trainer functions by setting
ACRO_BAL_PITCH,0
ACRO_BAL_ROLL,0
ACRO_TRAINER,0

For my flight testing I have been using:
ACRO_BAL_PITCH,50
ACRO_BAL_ROLL,50
ACRO_P,4.5
ACRO_TRAINER,0

Things to discuss are:

Is the performance acceptable?

What additional features are needed? (switched trainer functions, zero throttle doesn't stop motors)

Is there a better algorithm?

Do you see any problems with the code?

How does the performance and feel compare with other systems? (please only comment if you have flown those systems and this system on a well set up copter, anything less is a waist of every bodies time)

I have spent at least 20 minutes doing nothing but flips and rolls of various combinations and mixtures and a similar amount of time doing yank and bank maneuvers. I have not found a problem or any bad habits.

I look forward to your feedback and ideas.

E-mail me when people leave their comments –

You need to be a member of diydrones to add comments!

Join diydrones

Comments

  • Developer

    Yeh, it has been a bit harder for some people than others.

    It is sort of disheartening as a developer. We have been working on this release for at least 3 months now, maybe more. It works so well when all the calibrations have been done. But some people don't do them at all, others have vibration problems that need to be addressed.

    Once those user issues are addressed there are a couple of things that we can't change. One of them is the GPS accuracy and drop outs. The new code shows them up more because it can be tuned more aggressive.

    There are a couple of things we will do before we actually release 3.0 (3.01 by official release). We will slow down the loiter correction, auto accelerations and PID parameters. This will tend to hide the problems with the GPS like 2.9.1b and earlier did but still retain the improved loiter.

    The thing we may still be able to do better in the code is the third order complementary filter used in the inertial navigation. I think we can change it to make it easier to set it to rely less on the accelerations and more on the baro and gps. Currently if you do this too much the velocity prediction starts moving around to much.

    We will get all these issues sorted but this is such a massively complicated system it just takes time. And the time spent on support is mind boggling!

    I have a change in the works that I hope will fix the I term issues but I have been flat out and haven't test flown it myself yet.

  • Leonard, I do not think your modification converted ArduCopter from reliable working horse into nervous diva. I am pretty sure that it is not a faulty GPS causing my problems after reading V.3 discussion. It is simply the price for precision that has to be paid. But why should I fumble around with Compassmot, adjust declination manually, etc. and maybe fail in the end just to get precision I definitely do not need?

    I mainly fly FPV with my APM Quad, sometimes a bit aerobatics now. I need rock solid RTL in case of loosing connection not the hope for nailed in the spot Loiter mode!

    So would it be difficult to implement your Pure Acro into 2.9.1b?

    I will try Compassmot and declination adjustment today and all the setup steps proposed by Marco Robustini. I will try it once and downgrade if Loiter won´t work after. If it´s that complicated and unreliable it´s not for me!

  • was all stable on 2.9.1b - board is heavily isolated with rubber foam. Might have to do some IMU logs and see whats going on.

  • Developer

    Hmm, let me know how you go with 2.9.1b. I haven't changed anything that would mess up loiter on version 3. It does use a very different control algorithm to 2.9 that is set much more aggressive than 2.9 was and therefore is more sensitive to GPS errors and compass errors.

  • Oh, I guess I didn't close the loop here.  I figured out why I was having trouble compiling with the new Acro for TradHeli.  We have run out of memory.  The only way to get it to fit is to turn off some other features.  So I have turned off OptFlow for now.

  • 12-HAK, what you describe as a gradual drop of a corner is quite possibly what we used to call "leans" and is caused by high vibration levels which incidentally will also mess up your Loiter.

  • Interesting, I am having the same issue with loiter. Thought it may have been unique to me but obviously not.

    Another weird thing I have had is a gradual drop in one of the corners. I have had this twice on the front left and front right. As I am flying I notice that I am giving more and more correction until I run out of stick. The first time it happened it eventually spiraled down to a crash. Second time I noticed it and landed while I could.

  • Just skimmed over V.3 discussion. I must admit that I am not too keen on the inertial navigation stuff. So is there a way to combine 2.9.1b with Pure Acro modification or in other words is it possible to turn of inertial navigation completely to get back the reliability and simplicitiy of 2.9.1b sacrificing V.3´s precision gain since I don´t need it at all?

  • Acro does its job perfectly, I reduced Rate I to 0,015, still no pitching up.

    But Loiter simply does not work at all at the moment. GPS fixes position correctly at every reboot but then starts wandering around sooner or later, missing target up to hundreds of meters within a minute or two even when grounded and motors stopped.

    Tried to reduce ACC influence, modified Loiter PIDs a lot, no change. GPS defective or V3 issue? I will downgrade to 2.9.1b tomorrow since Loiter worked pretty good before.

  • I don´t want to say that I would have guessed high expos watching this video but you should definitely try lower values in aerobatics and compare.

    We do not need to get ArduCopter there, it certainly is, at least!

This reply was deleted.