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

DIY Drones via Twitter
RT @chr1sa: Somehow I missed this, but last week @Nvidia released a new version of its Isaac robot development framework. Lots of new Lidar…
15 hours ago
DIY Robocars via Twitter
RT @Smartphone89: DonkeyCar Racing League Korea #donkeycar @diyrobocars https://t.co/mDlHDR1d98
Friday
Jørn Ramnæs liked VIDEO LINK's profile
Friday
Mark Harrison left a comment on Moderators
"Wow, Ning2 looks really great on mobile. I had sort of drifted away as my browse-time went more on my phone, so this is great."
Friday
Hank Deucker left a comment on PIXHAWK
"I am sure most will say not again, Pixhawk telemetry. I do need help and all can be reassured that I have spent many hours scouring the net for useful information. I am not new at quadcopter flying, I started in 2012 and have progressed through many…"
Thursday
DIY Robocars via Twitter
https://t.co/rLmFr8M2UK
Thursday
Hank Deucker left a comment on PIXHAWK
"Tomorrow, I am thinking about the wording at the moment."
Thursday
DIY Drones via Twitter
Welcome to the new DIY Drones design!. You may have noticed that DIY Drones looks a little different today. That's… https://t.co/cg2EmeDGMQ
Wednesday
DIY Drones via Twitter
New! Online Training on Drones for Disaster Response https://t.co/brqRuujjY2
May 26
DIY Robocars via Twitter
https://t.co/8EMCvYW6oz
May 25
DIY Robocars via Twitter
RT @OttawaAVGroup: We are going to try something new this week. We will be having a drop-in style meeting Wednesday @ 7-9pm EST. Pop in and…
May 25
DIY Robocars via Twitter
RT @tawnkramer: Thanks Everyone for another fun virtual race! Amazing Ai racers competing head-to-head, Virtual Makers Fair event. Catch us…
May 23
DIY Robocars via Twitter
RT @make: Find out the latest from @diyrobocars at 10am PT from @chr1sa of @3DRobotics on Virtually Make Faire! #makerfaire #maketogether #…
May 23
DIY Robocars via Twitter
RT @Heavy02011: Join us Saturday online: Virtual Race League: @DIYRobocars Race #2 - Parking Lot Nerds https://t.co/aJUu4sdutx #Meetup via…
May 22
DIY Robocars via Twitter
RT @donkey_car: Yay, we are part of the virtual @makerfaire with @diyrobocars. Come see our race or better yet train a model and race with…
May 21
DIY Robocars via Twitter
RT @chr1sa: The @DIYRobocars Virtual AI Race is going to be part of the virtual @makerfaire on Sat! https://t.co/wnMDAboLID
May 20
More…