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

    By the way, #2 is the one that needs to be debated with some other people on the dev team.  Some people just want the motors to spin, others (like you) also want it to stabilize at min throttle.

  • Developer

    Some additional changes it improve the ACRO experience would include:

    1. Separate parameter for yaw and roll/pitch to replace ACRO_P

    2. Motors always spinning and stability patch enabled

    3. We could add some default expo to the stick inputs.

  • Developer

    I found a problem with the yaw controller that basically stops things from leveling using the yaw axis. Not a serious problem but here is the line that needs to be changed.

    nav_yaw = (float)nav_yaw*constrain_float((1-fabsf(stick_angle/4500.0)),0,1)*cos_pitch_x;

  • Developer

    I lost my gopro so it is a bit hard to do a video. I would need to use my phone! To be honest though, I don't think the pilot would do acro justice.

    A frame mounted camera might look ok but I am not comfortable doing things too close to the ground so the ground based camera isn't going to be great.

  • Developer

    where's the video man?!  we want the video!  :-)

  • Developer

    yes, this is capable of both flips and rolls.

    I spent about 20 minutes testing flips and rolls, also half flip followed by half roll, flips from fast forward flight, full throttle (large radius) flips and rolls. I didn't find any bad habits.

    I find the acrobatics pretty easy, it is perfect coordinated turns and figure eights that are difficult! Doing them forwards backwards and sideways is completely beyond my abilities.... so far.

    I am looking forward to getting feedback from someone who can really fly :)

  • Leonard,is it o/k now to do a Flip,Marty.

  • my settings are the same as yours but ive got Accro P@6,the APM just gets better and better many thank's,Marty

This reply was deleted.