I've got a question about Python Scripts in the Mission Planner:
I want to send waypoints to my Arducopter with a Python Script. I already found this page: http://code.google.com/p/arducopter/wiki/Python.
Unfortunately there is no information about how I can send whole waypoints to the quadrocopter.
I would be glad if someone would have an answer!
do you want to send guided mode wp's.
or a whole mission?
I want to send guided mode WPs
the next mp version will have more access to the internal mavlink processor. I will need to update this post once its released as new commands will be available under "MAV"
Thank you for your quick response!I'm looking forward to see the next version!
By the way: do you know when the next version will be available?
from ArdupilotMega import *
item = Locationwp()
this will not currently work.
as I missed the locationwp stuct in the current version.
but this code will work in the next version
Thank you very much!
Is there a possibility to run the script from an IronPython Terminal?
Where can I find the ArdupilotMega Module I have to import?
the ArdupilotMega Module is the MP itself. and technicly can call almost any function inside the mission planner,
I'm also very interested in this added scripting functionality.
Additionally I'm wondering is it possible to add custom commands to the Mission Planner? It says these can be modified in the MAVLink Parameters Window, but I can't seem to find this. (http://dev.ardupilot.com/wiki/mavlink-parameters/)
Also I'm wondering does the Mission Planner send a heartbeat to the ArduPilot? If so, is there a way to change the frequency at which this is sent?
the mission planner sends a HB at 1hz. this is the normal for mavlink.
using python you should be able to command whatever you like. but you need to know how the mavlink protocol works.
as for bottle drop, you could do it via pwm override.
this is the code to do it in c#
MAVLink.mavlink_rc_channels_override_t rc = new MAVLink.mavlink_rc_channels_override_t();
rc.chan1_raw = 0;
rc.chan2_raw = 0;
rc.chan3_raw = 0;
rc.chan4_raw = 0;
rc.chan5_raw = 0;
rc.chan6_raw = 0;
rc.chan7_raw = 0;
rc.chan8_raw = 0;
with the import of the base app, this is all posible
Thanks for all of your efforts - you rock!
Has the "next version" referenced above with the access to MAVlink processor been released? There is no mention of a version number.
I notice that the documentation of the python scripting interface is very brief. This is a function that I am interested in. Particularly being able to set new Waypoints during a mission. Could I possibly help you to expand it and add the new functionality to it?
is there a manual for python scripting for mission planner? Would the scripts in Mission planner run in Andropilot? I am looking to learn how to script an auto mode routine, but have only found brief references to python scripting, if there is a "User guide" for python scripting in Mission Planner, would you link me please? I would like to try my programming skills out on some practical flight routines for Arducopter. any help or hints to where to begin would be greatly appreciated. I also want to say THANK YOU MICHAEL for giving me my new obsession :P i love what you've written/created thanks in advance