Controlling a QuadCopter with code

I'm a Programming Intern and I've been given the assignment to control a QuadCopter (using APM 2.5) without the Mission Planner or RC Controller. Some goals are to be able to communicate with the QuadCopter, go to a specified altitude and stay there until it's commanded to land (for now).

I want to be able to control it using programming code from my computer. Has anyone ever heard of such a thing? Does anybody know where there are some good starting points to read about? Where can I go to get more information on controlling the QuadCopter from the source code?

Thanks in advance.

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

Join diydrones

Email me when people reply –

Replies

  • Hey Mike,

    It has been a while since this thread was active.  I am just curious if you or anyone else made progress on this project?

  • The combination of wireless mavlink, python scripting for apm control, video telemetry, and opencv is unbelievably powerful. I am surprised that more people are not exploring this. For example it is possible to create a fully autonomous aerial video quad that can track faces and aim the camera/navigate to get a desired perspective while allowing the subject to move about. Who needs a camera man? The possibilities are endless.
    • I'm glad to read your comment because we are currently working on that kind of issues. The goal is to have an autonomous quad that could film a preselected target.

      By now, we managed to make the quad take off when the target is in the camera field, and land when it leaves the field.

      The next step is to split the camera field in several parts and to make the quad react to target's position.

      I would be very intrested in talking with you about these issues. I've made a discussion about that here.

  • Hello,

    I'm also really interested in these issues.


    We are using MavLink protocol to control a QuadCopter using APM 2.6 (or at least trying). We would like to take off the QuadCopter when a camera detects a target.


    By now, we can easily arm the QuadCopter with a computer trough MAVLink, but we're stuck on the take off (we are planing to use missions). If anybody is interested, I can help in arming the QuadCopter with MavLink command.


    Any help for take off is welcomed.

    Thanks.

  • I guess essentially what I'm wanting to do with this is kind of create my own Ground Control Station except making it SUPER simple (for the time being). Once it's actually up and running, then I can make it more powerful. I feel that I've gotten close on a couple of attempts but nothing has seemed to stick or at least pan out. Maybe I'm just looking in the wrong place.

  • Hey Mike, 

    I'm looking into something similar. Here are some leads I have found:

    If anyone knows of any other good links/leads please let us know. There might be an elephant in the room that I'm missing that could make life much easier. Maybe some hacked away version of ArduPilot already.

    It seems like if you want to give the ability for people to navigate around by clicking where to go on a map and specifying altitude, the fly by wire approach would be easier as you let the autopilot do the heavy lifting. I'm pretty sure the loiter and waypoint commands will do the trick for your first part as you described.

    Because of the GNU GPL v3/Creative Commons 3.0 BY license of ArduPilot you can just rip out all the good bits of  code, add in your own, and hide away any parts from the users that you need to. Since I don't think lag will be too much of an issue (autopilot makes real time controlling un-necessary)  I'm going to try to make a program in Python that does any processing needed, then gets the APM/Mission Planner to do the next command.  Lucky for me there is already a Python module called MAVProxy for the protocol. Automated GIS surveying here I come! 

    I haven't dug too deep into this yet, your post spurred me to look into it just now. 

    Good luck, have fun!

    edit: 

    Someone here is part of the way there: http://diydrones.com/profiles/blogs/scripted-fixed-wing-acrobatics

    Something else in the right direction:  https://code.google.com/p/ardupilot-mega/wiki/ProgrammingArduino 

    • hi,

      i am working in ardupilot 2.6 board. I am writing a code in arduino IDE to control ardupilot using radio controller. I am facing some difficulties. I found this blog useful. But when i tried to open the above links, i am getting 404 file not found error. I feel that these codes can help me. Can you please help me to get above linked files.

      Thank you

This reply was deleted.

Activity