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
May 15
DIY Robocars via Twitter
May 14
DIY Robocars via Twitter
May 13
DIY Robocars via Twitter
RT @f1tenth: Say hi to our newest #F1TENTH creation for @ieee_ras_icra next week in Philly. It’s going to be huge! 😎 🔥 @AutowareFdn @PennEn…
May 13
DIY Robocars via Twitter
May 11
DIY Robocars via Twitter
May 8
DIY Robocars via Twitter
RT @SmallpixelCar: Noticed my car zigzagged in last run. It turned out to be the grass stuck in the wheel and made the odometry less accura…
May 8
DIY Robocars via Twitter
RT @SmallpixelCar: Test my car. RTK GPS worked great. Thanks @emlid for their support. https://t.co/EkQ6qmjmWR
May 8
DIY Drones via Twitter
RT @chr1sa: @kane That's @diydrones circa 2009. Still have a box of those Canon cameras that we used to strap into planes, just like this.…
May 3
DIY Robocars via Twitter
RT @chr1sa: Our next @diyrobocars race is going to be outside at a real RC racetrack in Fremont on May 28. Fully autonomous racing, head-to…
Apr 30
DIY Robocars via Twitter
RT @f1tenth: Our Spring 2022 F1TENTH course @PennEngineers is coming to an end with a head-to-head race as a big finale. So proud of our st…
Apr 26
DIY Robocars via Twitter
RT @DanielChiaJH: I wrote a thing! Throughout the development of my @diyrobocars car I've been using @foxglovedev Studio to visualize and d…
Apr 23
DIY Robocars via Twitter
RT @SmallpixelCar: My new car for high speed. Low body, everything ( @NVIDIAEmbedded Jetson Xavier NX, @emlid RTK GPS, IMC) under the deck…
Apr 23
DIY Robocars via Twitter
Apr 21
DIY Robocars via Twitter
RT @f1tenth: F1TENTH Race training setup @PennEngineers for our upcoming ICRA2022 @ieee_ras_icra competition. @OpenRoboticsOrg @IndyAChalle…
Apr 21
DIY Robocars via Twitter
RT @fatcatFABLAB: Proud to be hosting a restarted DIY Robocars NYC Meetup April 26. Come by if you want to talk about and race self-driving…
Apr 17
More…