For the next version of APM (the fixed-wing codebase), we're thinking about adding an acrobatic scripting language, so you can program your UAV to do awesome robotic stunts. APM already suppports inverted flight, and adding other maneuvers is technically easy once we decide on how to program them.


As a comparison, the UAVDevBoard uses LOGO as its scripting language and also supports inverted flight and harrier/hovering. APM does its scripting with MAVLink via the Mission Planner or HK-GCS, which is a more visual way to plan a mission.


One option is that we could add MAVLink commands that took the following form:

  • Roll (rotations/distance, rate)
  • Knife-edge (duration/distance) 
  • Loop (radius, degrees)
  • Harrier/hover (duration)
Acrobatic commands would be executed in parallel with waypoint commands, so you could script the position, too.
What do you think? What's the best way to script acrobatics?

Views: 2261

Comment by Simon Wunderlin on July 27, 2011 at 8:31am

I am not really into 3D aerobatics, this is what all the youngsters seem to love these days.

Classic fixed wing aerobatics consists of small set of primitives:

- straight lines
- turns
- loops
- rolls (line/barrel/snap)
- knife's edge
- raversement (don't know the english word, go straight up until speed is 0 and let the nose dive vertically again)
- ??? (did I forget something?)

All of the above can be done inverted.

From my experience with aerobatices (real and with rc planes) engine/prop control is crucial (speed, torque).

I think the language shouldn't matter much becuase I think the code would have to be compiled into an space and cpu efficient format before uploading to APM.

Comment by Simon Wunderlin on July 27, 2011 at 8:33am

About the language: better have a well documented format and let the community build the client side tools ;)

3D Robotics
Comment by Chris Anderson on July 27, 2011 at 8:43am
Simon, scripting is not done at compile time with APM. We do mission planning via the Mission Planner, and the mission is sent to APM via USB or wireless and saved in EEPROM.

Ideally, we would use the client-side tools we already have: the GCSs (Mission Planner, HK-GCS, QGroundControl)
Comment by Simon Wunderlin on July 27, 2011 at 8:47am

Ok, that was a bit confusing I guess: I didn't mean that scripting should take place in the APM project. I was just suggesting to use whatever scripting language might be right and the use a compiler to compile a easily readable language into a (maybe binary format)  and the upload to the APM. Or are the plans to use regular waypoints for aerobatics?

3D Robotics
Comment by Chris Anderson on July 27, 2011 at 8:52am

Simon, my instinct is to just add acrobatic commands to the Mission Planning scripting we already have, with waypoints.


But we're also thinking about adding a camera scripting language. That and acrobatics may be more "path" oriented approaches than the current "waypoint" approach. So there may be a case for a different method.  

Comment by Alex on July 27, 2011 at 10:09am

By adding acrobatic commands to mission planning do you mean that at a waypoint APM will then perform a loop, or roll etc.., and then once complete fly to the next waypoint to perform another acrobatic command?  I think it would be good as it will be very easy to program and have fun with it.

Comment by Dale on July 27, 2011 at 4:31pm

maybe waypoints would have target attitude or rate, in addition to just location

Comment by Steve on July 27, 2011 at 4:51pm

Maybe it is just me but what is the fun in pressing a button and having the FC do it for you? 

Comment by Ramon L on July 27, 2011 at 5:23pm
Is not fun, but as I see it, its a great step for furder development of complex maneuvers that maybe us cant replicate on the sticks.
I also think that if you can program harriers on the APM then you are very close to program auto-landing ;) Keep it going!

Comment by William Premerlani on July 27, 2011 at 5:40pm

Hi Chris,

There is a tool for visualizing LOGO flight plans for the UAV Devboard. For more information, see the UDB LOGO Wiki. UDB LOGO is Ben Levitt's creation, it works rather nicely. I don't think Ben ever intended it for aerobatics.

For aerobatics, the UDB team did some work with the academic community to define a flight description language. I was not involved directly, I am hoping that Peter Hollands or Ben Levitt might comment on that. The idea was to develop a language that could describe at a high level pretty much anything that anyone might ever want to do, and then have a lower level language for execution. There was some really nice architectural work done by the academics, but it was never implemented.

Peter Hollands has done some work on a MavLINK interface for MatrixPilot. It has not yet been completed because there is not enough RAM on the UDB3. When the UDB4 goes into production in a month or 2, I expect that the team will continue work on the MavLINK interface, so that we will finally be able to load flight plans on the fly.

Anyway, I am going to see if I can put Peter or Ben in touch with you to see if you can get any use out of the work that was done on the flight planning language.

Best regards,



You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service