APM Planner Scripting with Processing?

So, the latest version of APM Planner added the support for Python Scripting.  

http://code.google.com/p/arducopter/wiki/Python

I don't have any experience with that language.  I wrote an app in Processing that takes input from TouchOSC on my iPod Touch where I created a joystick-resembling layout.  Is there any way to integrate that into the Planner?  If not, is there any way I can "map" certain values to the joystick control option in Planner and let it take it from there?

Also, I just got the idea (if the above options don't work) to have Processing take input from the TouchOSC and output it as a virtual joystick which I could then use wtih the APM Planner.  

Thoughts?

Thanks.

IMG_0350.PNG

IMG_0352.PNG

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

Join diydrones

Email me when people reply –

Replies

  • Allow me to give you something I made. It's a simple UDP setup that receives values from the planner, but you could easily turn it around to send values. Be careful though, I have noticed some float-precision problems, that I believe is within the mission planner's python interface itself, where you lose 2-3 points of precision, something I have yet to completely trace back to the source. This causes a problem with GPS points more than anything. resulting in you losing about 300-1000ft of accuracy on any values you return. I'm not sure if this occurs sending values in, but I know it happens pulling values out. My forum post is here: http://www.diydrones.com/forum/topics/apm-adaptive-flying-video-ana...

    My files are on the bottom, but you might want to go to the third page and check out more options found on the bottom post, and read my code comments which I forgot to add in the actual code ;) I literally have never used Python before this, and it is incredibly easy to use. I recommend using Python 2.7, not 3 or higher, because it is easier and has a lot more example code and support. Also, you might benefit from using TCP instead of UDP. Let me know if you have any questions! Thanks!

  • Hello all, well I'm about to do this as well.

    Has anyone made progress here? 

  • Would be an interesting way to use drone! did you had any success with trying this technique?

  • I'm also interested in using the python script.  I've found the proper button on the "actions" tab.  but when i click I'm only presented with a text file showing the example code.  When I close that window it asks if I want to execute (I say yes) and it will execute the example, but locks my rc controller out.  I also never see any of the displayed text.......  I'll keep workin.

  • Developer

    how would the device talk to the planner?

    tcp?

    other?

This reply was deleted.

Activity