Hi,

I have only seen time-based WP missions, or just individual WP commands using the python scripting. I would would like to send a whole mission using a python script.

Just to quickly explain what I am trying to do: I am using a program to identify points of interest using a downward facing camera feed, from which I can create a waypoint mission file (in the right formatting and protocol). I am using Matlab to do some image processing, and I am using the TCP mavlink feed (ctrl-f in Mission Planner and using mavlink) to get the real time GPS information to attach the position to the image. Then I can pick out points on the image and give an estimate of the Lon and Lat. I create a WP file with these points at a predefined altitude. Then, with the press of a button, I would like my copter to follow those waypoints.

What I would like to do is run a python script (within Matlab) to upload and run that mission. I wanted to take advantage of the existing WP scripting of the autopilot. In other words, I am trying to avoid adapting the time-based method (that JoeM made) to use telemetry info and essentially do the same thing that the autopilot has already been programmed to do. I thought that this method would be easier, but I have not found a way to run a 'load WP file' command.

So the two main things that I am stuck on are:

- Can I run a python script from outside of the Mission Planner application? (I haven't found an answer to this question online, so I am making a simple motor test script to see if I can run it from Matlab)

- How can I upload and run a full waypoint mission file with the python scripting?

Thanks,

Michael

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

Join diydrones

Email me when people reply –

Replies

  • Hello michael i am trying to do the same thing but with the help of MATLAB can u help or advice on what i should do
  • Use mavproxy.
    • Thanks. I looked into it a little and saw that it had exactly what I needed to upload the waypoint file. But I haven't found out yet if I can run a command in mavproxy using a script in matlab. What I saw was that the commands needed to be entered in mavproxy "via the command line or the menu bar of the GUI console." Do you know anything about that?

This reply was deleted.

Activity