APM adaptive flying/video analysis waypoint help

I have a quick question on sending waypoints through the APM planner. I am working on a project using OpenCV to do live video analysis of FPV feeds in order to look for "targets" for a competition, i.e. post-processing the video on a computer and determining course of action from the results. From there, I have to modify the flight plan in-flight to acquire the next target, retreive data, such as the GPS data at the point where the plane identified the target, from the planner, and print the data out to a txt document. My question is; is there any way I can retrieve this data from the planner and send waypoints through the planner, such as an API? I would like to keep the APM planner in the loop, as it works really well, and I would rather not cut it out. I know I COULD make my own custom program/gui that gets the data I need over serial, but if I can avoid it, please, let me know. Does anyone know of a way to get the values out of the planner that I need, and a way to pass waypoints to the plane through the planner? I really only want to interface the video-processing program and the planner, basically just to send commands and get values. Let me know what you think I should do! Thanks!

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

Join diydrones

Email me when people reply –


  • Hi,

    Thank you so much .. It was an useful discussion. But , what happened after that? Eere you able to retreive  and to send the GPS  values through the planner software??

    • As it turns out, using Mavproxy is a much simpler option. I just created my own "module" (plugin) for Mavproxy, and use it to send any values that are sent through mavlink from my copter through to the network. Mavproxy also has a ton of output capability as well, so you can still keep mission planner as a front end and just put Mavproxy in the middle. Mavproxy also allows you to send commands. For example, as of right now, I have the ability coded in a custom Mavproxy "module" (plugin) to allow me to send my copters to a specific waypoint, specific location, or even move it over a few meters in a direction. I can also tell them to land and what action to take when they arrive at a location. If you need help or example code for MavProxy, let me know! It is fairly confusing, and took me quite a few hours to figure out, but it is definitely worth all the work. It's become a great tool. And it can be run on onboard Raspberry Pi's, which is a huge plus. Let me know if this helps!

      • Hi,

        I was very interested in you work,can you give me some Mavproxy example code?

        Thank you!

  • thanks you all for the interesting work, i am at the beginning of a similar project and will post and share my experiences as soon i am testing out in the field.

  • Thank you all very much! I took a break from this project over spring break, and just returned to it, and getting the values out of the planner through a python UDP script works perfectly :) Just make sure you use python 2.7.3, not 3.0 or higher. I had some problems with the newer versions not working right. Thanks again, I'll keep you posted on how it goes!!!

  • Developer

    apm planner support a very simple guided mode function mode via www.


    this will send a guided mode wp to the connected mav.

This reply was deleted.