Automating execution of missions and changing configurations using px4, jmavsim, mavlink on MacOS

Hi All,

I have recently started using PX4 and am looking for some suggestions regarding automating the process of running multiple missions sequentially, that is one after the other using PX4 SITL simulation with JMAVSIM (headless execution) on MacOS. Even though I have created the missions using QGroundControl, I don’t want to use it for running the missions as I felt mavsdk is more flexible.

My goal is to start px4, jmavsim and mavlink automatically using a script (in Python maybe or using some terminal commands) and execute one mission after the other from .plan files placed in a particular directory. Also, for each of my missions I want to use a different set of configurations. In summary, use a script to:

  1. Automatically open px4(headless), jmavsim(headless) and execute mavlink.
  2. Automatically upload missions from existing .plan files using mavlink.
  3. Automatically set a pre-defined set of configurations (maybe from a saved file) before each mission is executed using mavlink.
  4. Automatically capture the flight behavior(this I belive will be captured in the generated log file which I am able to process)
    -All in MacOS, with no intervention from QGC.

Any suggestions on what would be the best and simplistic way to set this up would be much appreciated. I have looked through tutorials and it seems like ROS on Ubuntu is the best way to go about it, but I need to use MacOS and ROS at this point would make things complicated.

Thanks in advance!