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

DIY Robocars via Twitter
RT @TinkerGen_: "The Tinkergen MARK ($199) is my new favorite starter robocar. It’s got everything — computer vision, deep learning, sensor…
Monday
DIY Robocars via Twitter
Monday
DIY Robocars via Twitter
RT @roboton_io: Join our FREE Sumo Competition 🤖🏆 👉 https://roboton.io/ranking/vsc2020 #sumo #robot #edtech #competition #games4ed https://t.co/WOx…
Nov 16
DIY Drones via Twitter
First impressions of Tinkergen MARK robocar https://ift.tt/36IeZHc
Nov 16
DIY Robocars via Twitter
Our review of the @TinkerGen_ MARK robocar, which is the best on the market right now https://diyrobocars.com/2020/11/15/first-impressions-of-tinkergen-mark-robocar/ https://t.co/ENIlU5SfZ2
Nov 15
DIY Robocars via Twitter
RT @Ingmar_Stapel: I have now explained the OpenBot project in great detail on my blog with 12 articles step by step. I hope you enjoy read…
Nov 15
DIY Robocars via Twitter
RT @DAVGtech: This is a must attend. Click the link, follow link to read the story, sign up. #chaos2020 #digitalconnection #digitalworld ht…
Nov 15
DIY Robocars via Twitter
RT @a1k0n: Got a new chassis for outdoor races (hobbyking Quantum Vandal) but I totally didn't expect that it might cause problems for my g…
Nov 11
DIY Drones via Twitter
First impressions of the Intel OpenBot https://ift.tt/36qkVV4
Nov 10
DIY Robocars via Twitter
Nov 9
DIY Robocars via Twitter
Excellent use of cardboard instead of 3D printing! https://twitter.com/Ingmar_Stapel/status/1324960595318333441
Nov 7
DIY Robocars via Twitter
RT @chr1sa: We've got a record 50 teams competing in this month's @DIYRobocars @donkey_car virtual AI car race. Starting today at 10:00am…
Nov 7
DIY Robocars via Twitter
Nov 6
DIY Robocars via Twitter
RT @a1k0n: Car's view, using a fisheye camera. The ceiling light tracking algorithm gave me some ideas to improve ConeSLAM, and having grou…
Nov 5
DIY Robocars via Twitter
RT @a1k0n: To get ground truth I measured the rug, found the pixel coordinates of its corners, calibrated my phone camera with my standard…
Nov 5
DIY Robocars via Twitter
RT @a1k0n: @DIYRobocars is back in December, but outside. Time to reinvestigate ConeSLAM! I rigged up a quick and dirty ground-truth captur…
Nov 5
More…