Arduplane autonomous aerobatics

Thanks for starting this effort! Iā€™m really looking forward to it

If you want to see (nearly) perfect aerobatic maneuvers logged with ArduPilot, check out some of the logs that FlightCoach users (expert RC pattern pilots) have generated.
There are a couple of screen captures on the FlightCoach home page: https://www.flightcoach.org/
And thereā€™s a new blog post here describing the motivation: Flight Coach - using ArduPilot .bin files as an interesting way of viewing aerobatic flights

Iā€™ve done a quick demo of lua scripted aerobatic missions in the above video. The implementation of this is in the following PR:

4 Likes

First testing at the field - rolls and loops with a foamyā€¦

Work to be done, but the basics thereā€¦

Processing: loop.MOVā€¦


loop

1 Like

Iā€™m imagining that an aerobatic library might consist of a number of various scripts that someone might develop to do various stunts. Is there a way to have the NAV_SCRIPTING waypoint specify a script by name, rather than using 1=roll, 2=loop etc?
This would also mean less code has to be baked into the firmware.

A square loop using a simple script. A long way to go, but looking great after 24hrs :slight_smile:

Have you considered yet how to do closed-loop tracking of a desired 3D trajectory (template) such as those Thomas David is generating using Python?

I have been interested in this idea for a long time, but assumed iā€™d need an SBC (ie ras-pi) to do it. nice to see that it might be easier than that! however, i have some questionsā€¦

  • my planes are not like the over-powered foamies that have a 1:1 (or greater) Pwr:weight ratio, so my fuel/gassers canā€™t just initiate such maneuvers just anytime/anywhere. i need to assure airspeed, attitude, altitude before beginning such. Then iā€™m thinking ill need to monitor attitude with roll rate; attitude with airspeed and maybe altitude and throttle percentage (for loop). Will the current methods support algorithms that use such data to adjust maneuvering controls in accordance with live positional parameters? in other words, could such a program know when to enter a loop and how to adjust (more or less elevator) real-time to maintain a predictable airspeed and maneuver shape? or is that more trouble than itā€™s worth? i just want to avoid not reaching the apex because the plane is a little heavier (full fuel or other payload) or coming over the top so fast that the exit loses much altitudeā€¦or a roll that is too slow (relative to the attitude/altitude) that ends up on the ground.
1 Like

Flight Coach (www.flightcoach.org) was Tomā€™s idea - and the website really came to life by Artur Uzieblo - as part of this team I am keen to explore the application of autonomous aerobatics for training pilots and judges. It would be really interesting if Tomā€™s work helped with this :slight_smile:

Tom produced this for me - which is one of the initial goals to fly autonomouslyā€¦

2 Likes

A couple of videos - an autonomous loop and roll with Ardupilot - just a simple small foamy - but already looking good!

4 Likes

What are the specs of the plane @andyp ?

Hi Tim

It is a indoor EPP foam model - a 36" MSX - not ideal for Ardupilot - 3D control throws, unstable, and trim always different. I added a Matek H743-SLIM, BN-220 gps (no compass, no AS). I needed to add a 10A BEC as the 1A BEC in the ESC kept on browning out (no surprises there!). Because this is a ā€˜test bedā€™, I am using SBus out of the FC (as I will be using this on other models, and want to keep the setups similar) - so it also carries a SBus to PPM converter for the servos and ESC. For fun, while I was adding all this weight, I put on a ESP8266 to make changing missions etc easy.

Thatā€™s helpful. Iā€™ve just built a Bixler 2 with a Pixracer and as soon as I saw this topic, I setup an Ubuntu VM so I can build the firmware with this code in it. Iā€™m hoping to test this plane on the weekend (weather permitting) and should be able to flash the firmware try this out, very soon I hope.

just a thoughtā€¦ something that might help some planes is having some kind of ā€˜softā€™ entrance/exit to, say, a loop. rather than slam the elevator to the programmed position as fast as it will go, allow for some kind of gradual activation and release.

@tridge would be best to answer, but because it is using the rate controller, it is no different to when the FC requests any pitch or roll rateā€¦ so all that is already taken care of - certainly it looks good, and it is a pitch rate - not a simple servo positionā€¦

1 Like

Thats why I was asking if the waypoint could specify a script file @1Gump , @andyp . Then you could change the script yourself to tweak it.

1 Like

the script can control that, and a lot more. @andyp and I are working on an updated script which will do a lot fancier moves

1 Like

Yes I can see that - but what Iā€™m suggesting is that it shouldnā€™t be ā€œthe scriptā€ - it should be possible to create a different script for each different manoeuvre. A script for roll, a script for half roll, a script for 4 point roll, a script for loop, a script for inside loop, a script for half loop then fly inverted ā€¦ as many different scripts as people can think of. It will get very messy very fast if every manoeuvre needs to be coded into the same update() method with state variables to figure out which manoeuvre is the current one in progress.

So in other words - donā€™t assume people will use the ā€˜providedā€™ moves. People will want to code their own.

I maybe missing something, but not sure on the difference between a separate ā€˜scriptā€™ for each maneuver, and each maneuver being defined and referenced inside one script? You can define anything you like in the scriptā€¦

Currently it works really well - within the scrip we can create (for example) a ā€˜uplineā€™ and a ā€˜downlineā€™, and these are triggered by MP when you reach a WPā€¦ You could easily create a 3/4 loop and 1/2 roll and trigger that when a WP is reachedā€¦ really endless possibilitiesā€¦

Anyway, really early days - we will be changing to quaternion reference and vector navigation - so wind will be accounted for, etc.

It will take a while, but already it will fly a nice loop and roll - a good start I think :slight_smile:

1 Like