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

  • Issue:

    Switching from Acro to Stabilize or Alt Hold makes the copter yaw a little bit.

    All the rest couldn´t be any better! As discussed in a forum thread I removed any dampening material between APM and the bottom plate of the Discovery. Just mounted it with thin 3M double side tape.

    There is no difference in IMU logs to stock DJI and a huge foam construction I used there and considered best after some modifications. Works perfectly, keeps altitude within centimeters and loiters precisely.

    Was worried about magnetic disturbances when placing APM directly on PCB plate (was on top plate on stock F450 and some centimeters above PCB) but no issues as well! Or could the switching yaw be one?

  • Did the upgrade but at the same time switched my stock DJI F450 to TBS Discovery so it is hard to compare.

    It´s the first time that I have different PIDs on roll and pitch, the quad needs P term around 1,2 on roll and over 1,5 on pitch even though copter type is set to the correct "V-shape" or "Spider" mode.

    Funny thing, my stick deadzones were reset to (awfull high) defaults which I did not realize in the beginning. Just had troubles to hover FPV in Acro mode and the landings were a bit unprecise. But now with DZs back to 1 it feels controlled and smooth as usual.

    Loiter is without any oszillation now, is current Pure Acro version based on 3.0.1 final?

    In summary ArduCopter is at a point now where I can hardly see any weakness. The copter flies exactly as I want him to do, hovers and loiters on the spot, returns to home when asked. In brief it simply works! Very nice, so I can concentrate on increasing my FPV range!

  • Developer

    Nice. I think like you that Sport mode would be useful for filming. The most important for filming is not accurate positioning and banking angles, but smooth stabilization without wobble even in gusty wind situations. It is important to have angle limits because obviously we don't want to flip with a multi k$ camera under the frame...

  • Developer

    I talked to Randy about this today and our plan is to have two modes ACRO and SPORT. ACRO will make use of the three position switch to change between no levelling, levelling, and levelling + angle limit.

    SPORT mode will be also be able to use SIMPLE but I don't know if it will have any other options. I was thinking that SPORT mode won't be capable of rolls or flips but we may be able to set the maximum angle. I see SPORT mode being great for fpv, filming, and racing.

    It would be great to get feedback and ideas on this.

  • Developer

    Leonard, we have now 3 positions switches support for CH7 and CH8. Could be enough to select between 3 differents acro modes ?

    I think that if we propose two or three sets of 3 modes, available on CH7 or Ch8 the users would be happy.

    And add a parameter for mode selection so that we can choose the right mode if CH7 or CH8 are not used.

    Another possibility would be to add a five positions detector for CH7 / CH8 but this seems overkill to me.

    Olivier.

  • Developer

    Yeh sorry, I forgot to change the label.

  • Hi Leonard!

    This version is no longer labelled as "3.0.1rc1ACRO" but simply "3.0.1", correct?

    Means it is official release 3.0.1 plus pure acro capabilities without the need of toggling any switches so far? Just install and go ahead upside down?

  • Developer

    Hi all,

    I have got the next version of the ACRO code ready to test:

    https://github.com/lthall/ardupilot_ACRO/tree/ACRO2

    This hasn't got any fancy mode setting in it yet. Randy will sort that out before the release but what I am thinking is:

    1. Stabilised ACRO, no leveling

    2. Stabilised ACRO, leveling

    3. Stabilised ACRO, leveling and angle limited

    4. Sport Mode (earth frame acro)

    5. Sport Mode with simple.

    The problem is how to set this up with the mode switch and ch7 and ch8 switches. I am thinking we have two modes, ACRO and Sport. Then we use ch7 and ch8 to switch in leveling and angle limiting in ACRO. Sport will have simple mode but ACRO won't.

    Well, I think we are getting there!

    Thanks Bob for the limiting suggestion. I did something similar to this but not quiet the same. I also scaled the leveling based on all three inputs.

  • Leonard - let me know when you have the new code ready and I will give another test.

    Thanks :)

  • Developer

    Hey Bob, I get what you did with the limit. Very good, I will put it in!!!!!!

This reply was deleted.