SceneGEMS: Scenario Generation and Execution Framework for Maritime ASVs
Open-source monorepo that ties my research together: a Python backend for three-level COLREGS scene generation, a React console for exploring and replaying scenarios, Gazebo/ArduPilot simulation images, and a runtime COLREGS monitor, all orchestrated with Docker and MQTT.
- End-to-end: specification → scene generation → simulation → compliance monitoring
- Integrated with the WARA-PS core system (MQTT topics per vessel)
- Software-in-the-loop and hybrid real/simulated set-ups
SceneGEMS started as the integration layer for my research prototypes and grew into the framework I demo and evaluate with. It is open source and actively developed on GitHub.
Architecture
| Component | What it does |
|---|---|
| Backend (Python) | WebSocket service. Runs scene generation, orchestrates simulations, spawns worker containers. |
| Frontend (React + Vite) | Console for scenario exploration, preview animation, simulation control and monitor output. |
| Scenario generation subsystem | Three-level pipeline (functional → logical → concrete) based on the Refinery graph solver and constraint solving. |
| Scenario execution subsystem | Instantiates the simulated world and vessels and sends missions and low-level commands. |
| Monitoring subsystem | Reconstructs the scene at every step and assesses safety and COLREGS compliance. |
| Simulation images | Gazebo Harmonic and ArduPilot SITL, MAVProxy, agent containers. |
| MQTT broker | NanoMQ, bridging to the WARA-PS broker. Each vessel publishes state and listens for commands on its own topic. |
The whole stack runs with Docker Compose. The backend mounts the Docker socket so that it can start subsystem and simulation containers on demand, and tears them down when the session ends.
Workflow
- Specify. Write or pick a functional scenario specification in the editor (Refinery syntax). Presets cover common sizes such as 3 vessels, 0 obstacles.
- Generate. Derive initial scenes in batches. Covering all functional equivalence classes gives a functionally complete assurance suite.
- Configure. Each vessel is either externally controlled (the ASV under test, over UDP) or autonomous (follows its generated trajectory). Physics models can be configured or generated per vessel, and real vessels can join for hybrid tests.
- Simulate and monitor. Preview and simulation share a canvas. The monitor panel shows emerging COLREGS situations and violations at every timestamp, and the results can be exported as assurance evidence.
What I learned building it
Research code tends to stop at "the experiment ran once". Making the pipeline usable by someone else forced decisions that do not show up in papers: fingerprinted image builds, explicit system requirements, clean shutdown of spawned containers, and a UI that shows why a scenario failed instead of only that it failed.
Video
Gallery

References
- D. Frey, U. Kargén, D. Varró. 2026. SceneGEMS: Scenario Generation and Execution Framework for the Safety Assurance of Maritime Autonomous Surface Vehicles. MODELS 2026 Companion, 219–223. doi.org/10.1145/3837062.3838872
- D. Frey, U. Kargén, D. Varró. 2026. Automated Generation of Functionally Complete Assurance Suites for COLREGS-Compliance of Autonomous Surface Vehicles. MODELS 2026, 293–304. doi.org/10.1145/3822455.3830315