Hello guys,
What I want to achieve:
Run SITL simulator on linux programmatically with different mission files each time I invoke the simulator. The program should start SITL with a specific mission, let the simulator finish and then start SITL again with a different mission.
What I already did:
I configured some parameters to enable arming in auto-mode and I created a small lua script to automatically arm the drone.
The problem:
Everytime I load SITL the drone will just start the last mission that I loaded with wp load mission.txt .
I’m pretty new to ardupilot and SITL in general and I could not find any information on how to fulfill my wanted outcome so maybe you guys know better and can help me out here
I am running SITL on Linux using the sim-vehicle.py provided in the ardupilot repository.
Lacking deeper knowledge of SITL command line options, I’d incorporate a mission load function into your Lua script. Have it look for mission files in sequence until it finds one - like “0.waypoints”, “1.waypoints”, etc. Once it has found and loaded a mission, have it delete the file (or save a user parameter with the file sequence number) so that it will step to the next one one a subsequent boot.