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 –

Replies

  • 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.

    eg

    http://127.0.0.1:56781/guided?lat=-34&lng=117.8&alt=30

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

This reply was deleted.

Activity

DIY Robocars via Twitter
21 hours ago
DIY Robocars via Twitter
RT @_JonMyer: 🏎 We need your help in naming my #AWS DeepRacer Underground Track 🏎 @davidfsmith's track is going to be referred to as 𝗔𝗪𝗦 𝗗…
Thursday
DIY Robocars via Twitter
RT @gclue_akira: 仕事もおわったし、電脳化にとらい #マリオカートハック https://t.co/4IU90hCLgm
Thursday
DIY Robocars via Twitter
This is the hashtag to follow all the people in Japan who are hacking the new Nintendo Mario Kart with the real AR… https://twitter.com/i/web/status/1319281354664677376
Thursday
DIY Robocars via Twitter
RT @gclue_akira: @chr1sa @diyrobocars jupyter mario https://t.co/P0oHdjlCRq
Thursday
DIY Robocars via Twitter
RT @_JonMyer: 🚨Our 1st AWS DeepRacer Community Race is Underway on http://twitch.tv/aws 🚨 Join us to find out which member of your commu…
Tuesday
DIY Robocars via Twitter
Monday
DIY Robocars via Twitter
RT @BackyardRobotcs: After an admittedly long wait, the new Tinymovr R3.3 motor controller is now available https://tinymovr.com 🥳
Monday
DIY Robocars via Twitter
RT @_JonMyer: 🏎 1 hr left before the #AWS #DeepRacer Community 🏎 Top 5 Race tomorrow LIVE on Twitch 1st Place = $50 Amazon GC or AWS Credit…
Monday
DIY Robocars via Twitter
Oct 16
DIY Robocars via Twitter
Oct 15
DIY Robocars via Twitter
Oct 14
DIY Robocars via Twitter
RT @davidfsmith: Race virtually with The AWS DeepRacer Community Race and then join us on the track to see how your times compare on the ph…
Oct 14
DIY Robocars via Twitter
Oct 14
Hiroki Tanaka liked Hiroki Tanaka's profile
Oct 13
DIY Robocars via Twitter
RT @breadcentric: It's now!
Oct 13
More…