MissonPlanner Python Scripts Questions

Hi, I am a beginner with mission planner scripts. I have a couple questions that I’d really appreciate getting the answers to.

  1. I have read through “Python Scripts in Mission Planner” page but I am still confused about how the whole thing works. It seems to be missing info that are in their example scripts. Is there a full guide on how it works and how to understand it better? and from what I found, there isn’t much support for it online, is that correct or I am missing something?

  2. Is there a way to not receive syntax errors when coding with python mission planner? things like the importing modules, accessing the functions in the modules etc. for example, there is no “MissionPlanner” to import and if I run it locally, it throws errors but if i run it through MP scripts, it runs fine.

  3. So I have a python 3 script that reads a QR code and gets coordinates from it and output it in a file. What i want to do it, run that file, and then run the rest of my drone code. i’ve tried

os.system(“py -3 {filename}.py”)

and run the script through mp, and it doesnt throw any errors but it still doesnt work as expected. It works fine when i run it through my ide.
Is there a way to do what I am looking for through either this or another method?

I know about dronekit, but because I have already spent quite a while on this, I want to still use this if possible.

1 Like