Automated workflow testing using Ardupilot SITL in Gazebo Harmonic environment

I have set up the simulation environment following the Ship Landing Ignition Simulation - #24 by rhys , Ship Landing Support discussion. Many thanks to @rhys and the ArduPilot developers for putting this together. The simulation setup has been extremely helpful.

I am currently working on a vision-based algorithm for autonomous landing of a quadcopter running ArduCopter on a moving ship, without any active communication between the quadcopter and the ship. The goal is for the UAV to estimate and track the landing platform using onboard vision and successfully land despite the ship’s motion and environmental disturbances.

Now I would like to stress-test the algorithm extensively in simulation before moving to actual flight testing. Ideally, I would like to run something like 100–200 test cases automatically, with each test using different conditions, for example:

  • Different ship trajectories and motion profiles

  • Different ship speeds and accelerations

  • Different wind speeds/directions

  • Different initial UAV positions and velocities

  • Different approaches to the landing platform

  • Potentially different levels of sensor/vision noise

I have used ArduPilot’s AutoTest framework before, and it seems very well suited for running repeatable automated tests. However, since my setup now involves ArduPilot SITL integrated with Gazebo, I am not sure what the best approach would be for building a similar automated testing framework.

Has anyone implemented something like this with ArduPilot + Gazebo?

I am particularly interested in understanding whether I can:

  1. Programmatically launch/reset the Gazebo + SITL simulation for each test case.

  2. Change the ship motion and environmental parameters between test cases.

  3. Start the UAV mission and monitor the landing outcome automatically.

  4. Run hundreds of test cases sequentially without manual intervention.

  5. Collect metrics/logs from each run and determine whether a landing was successful or not.

I am considering building a Python-based test harness around SITL/Gazebo, but I would appreciate any suggestions on whether there is already an established approach within the ArduPilot ecosystem that I could build upon.

Any pointers, examples, or recommendations would be greatly appreciated.