3D Robotics

Adding acrobatic scripting to APM

3689417438?profile=original

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?
E-mail me when people leave their comments –

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

Join diydrones

Comments

  • 3D Robotics

    Amayer: Yes, Python scripting is now supported by the Mission Planner. It's in the manual here.

  • I like this script , if you can do this ,the auto-land strategy wish you add in APM, it will put the system become strong . Best WIshes


  • 3D Robotics
    I already covered that in the post. "Harrier/hover (duration)"
  • 3D Robotics

    What does "A/C" mean?

  • Maybe it is possible to record certain stunts that the masters perform for "canned tricks"

    that can be played back.

    I don't think so. Tricks are very dependent on environment and aircraft parameters.

     

  • Maybe it is possible to record certain stunts that the masters perform for "canned tricks"

    that can be played back.

  • Developer

    @Veikko, if you enable logging in your ground station, then you already are recording everything you need to replay a trick. The problem will be taking that data and turning it into something repeatable. The timing of the control movements is likely to be critical in many tricks, and if you just blindly playback the same sequence I suspect you won't get the same aircraft movement. So you'd need to edit the sequence to add some timing information, such as "do this until the pitch is greater than 30 degrees".

    We're going to need to experiment to see what works, then build up a public library of scripts that are known to work.

     

  • 3D Robotics

    Hyon: I'm afraid I don't understand the question. As mentioned APM and AC2 already do this. If you want to understand how they do it, please look at the code.

  • 3D Robotics
    Veikko: APM and AC2 already do automatic compass calibration.
  • Developer

    @Hyon, I don't actually fly my quad with a joystick, I just know how it works by looking at the code. I do use RC override on my plane, but not with a joystick, I use it with command line control in my GCS.

     

This reply was deleted.