Papers
Topics
Authors
Recent
2000 character limit reached

Stonefish Simulator: Marine Robotics Simulation

Updated 10 January 2026
  • Stonefish Simulator is a high-fidelity, open-source simulation platform for underwater and surface marine robotics research that supports advanced hydrodynamic and sensor modeling.
  • It employs a modular architecture combining a C++ core, GPU-accelerated rendering, and ROS integration to facilitate scalable, reproducible, and cost-effective experiments.
  • Its features include detailed 6-DOF hydrodynamic modeling, high-fidelity sensor simulation for sonar and event-based cameras, and automated dataset annotation for ML integration.

Stonefish Simulator is a high-fidelity, open-source simulation platform for underwater and surface marine robotics, engineered to support research in hydrodynamics, perception, planning, control, digital-twin integration, and synthetic dataset generation. Combining a modular architecture with advanced physics, sensor simulation, and automated annotation toolchains, Stonefish addresses the acute need for cost-effective, reproducible, and scalable environments, especially where real-world experimentation is constrained by logistics, risk, or safety (Grimaldi et al., 17 Feb 2025, Aldhaheri et al., 8 Apr 2025). The simulator is compatible with both ROS1 and ROS2, and its capabilities extend from classical rigid-body hydrodynamic modeling to differentiable simulation for soft robots and synthetic benchmarking for event-based and SNN-driven perception tasks.

1. Architecture and Software Stack

Stonefish is organized as a C++ core library enabling modular integration of physics, rendering, sensors, actuators, and environment modifiers (Aldhaheri et al., 8 Apr 2025, Grimaldi et al., 17 Feb 2025). The primary components are:

  • Core Simulation Kernel: Loads scenario definitions via XML/SDF, handling vehicle URDFs, environment assets, and plugin parameters.
  • Physics Engine: Built atop Bullet Physics and extended for underwater use (buoyancy, added mass, nonlinear drag, material interactions).
  • Rendering Pipeline: GPU-accelerated OpenGL renders water optics (absorption, caustics, turbidity) and vision-based sensor outputs.
  • Plugin Framework: Standardized interface for sensors (acoustic, optical, inertial), actuators (thrusters, robotic arms), and environmental modifiers (currents, seafloor, obstacles) (Grimaldi et al., 17 Feb 2025).
  • Middleware Layer: stonefish_ros1 and stonefish_ros2 bridges provide bidirectional communication with ROS, streaming simulated sensor data to topics and receiving control commands (Grimaldi et al., 2024).

External integration supports MATLAB/Simulink via ROS or custom bindings for closed-loop hardware-in-the-loop or real-time digital twin operation (Grimaldi et al., 2024).

2. Physical and Hydrodynamic Modeling

The Stonefish simulation framework implements complete 6-DOF rigid-body hydrodynamics following Fossen’s marine robotics conventions (Aldhaheri et al., 8 Apr 2025, Grimaldi et al., 3 Jan 2026):

(MRB+MA)v˙+(CRB(v)+CA(v))v+D(v)v+g(η)=τthruster+τexternal(M_{RB} + M_A)\,\dot{v} + (C_{RB}(v) + C_A(v))\,v + D(v)\,v + g(\eta) = \tau_{thruster} + \tau_{external}

  • MRBM_{RB}: Rigid-body inertia matrix
  • MAM_A: Added mass (fluid acceleration)
  • CRB,CAC_{RB}, C_A: Coriolis and centripetal matrices (for body and fluid)
  • D(v)D(v): Nonlinear damping (configurable drag, per-mesh or per-link)
  • g(η)g(\eta): Restoring forces (buoyancy and gravity), includes depth-dependent compression for hadal scenarios (Grimaldi et al., 3 Jan 2026)
  • τthruster\tau_{thruster}, τexternal\tau_{external}: Generalized forces from thrusters and exogenous forces

Hydrodynamic coefficients–including drag, added mass, friction–are supplied by scenario config for precise matching to physical prototypes, and per-triangle drag calculation enables mesh-level refinement (Grimaldi et al., 17 Feb 2025).

Thruster models range from simple quadratic ( T=KTnnT = K_T n|n| ) to physically accurate tabulation or manufacturer curve fitting, supporting zero/first-order actuator dynamics, Yoerger, and Bessa thruster physics (Grimaldi et al., 17 Feb 2025). For tethered platforms, Stonefish incorporates a lumped-mass cable model with spring-damper joints to capture realistic sag, drag, and tension transmission.

3. Sensor Suite and Measurement Models

Stonefish provides an extensible, high-fidelity sensor simulation suite, each with explicit noise modeling and true-to-life dynamics (Aldhaheri et al., 8 Apr 2025, Grimaldi et al., 17 Feb 2025, Mansour et al., 19 May 2025):

Sensor Type Physical Fidelity Key Features
Acoustic (Sonar, DVL) GPU beam-forming, noise, occlusion, speckle Structured returns, SNR matched to Gemini datasets
Event-based Camera DVS log-luminance with per-pixel event generation Asynchronous event streams, thresholds, refractory periods
Optical Cameras Pinhole + distortion, caustics, turbidity Sync with vehicle pose; photorealism for sim2real
Thermal Per-object and environmental blackbody/radiative transfer Screen-space shaders, temperature maps
Inertial, Navigation IMU (random walk, Gauss–Markov), DVL, magnetometer, pressure Realistic bias, colored noise, sensor dropout support planned

The event-based camera module replicates log-intensity DVS operation, emitting events at pixel (x,y)(x, y) when ΔlogI>C±|\Delta \log I| > C_\pm (Mansour et al., 19 May 2025, Grimaldi et al., 17 Feb 2025). Synchronization with ground-truth optical flow and ray-tracing underlies event-driven perception and SNN evaluation workflows.

4. Scenario and Environment Generation

Stonefish supports procedural and user-defined environment generation at high spatial and visual fidelity:

  • Stonefish-Scenegen: Procedural seabed generator, random placement of coral clusters, control over texture, scale, pose; reproducibility ensured via seed control (Mansour et al., 19 May 2025).
  • Coral-Rich Scene Generation: Clusters sampled on seabed mesh, poses aligned to surface normals, scaled [smin,smax][s_{\min}, s_{\max}] per sample, full URDF/world export for simulation (Mansour et al., 19 May 2025).
  • Stonefish-Boids: Advanced agent-based modeling of fish schools, using alignment, cohesion, separation, and leader-following forces, enhanced with OctoMap-based obstacle avoidance for dynamic multi-agent scenes (Mansour et al., 19 May 2025).
  • Dynamic Environment Features: Turbidity shaders, caustics, particle systems, spatially- and temporally-varying currents modeled using Gauss–Markov processes (Aldhaheri et al., 8 Apr 2025), pump realistic light attenuation and visibility (Grimaldi et al., 3 Jan 2026).

For digital-twin and applied autonomy, full vessel geometry import (via Blender), collision-mesh preprocessing, and real-time scenario synchronization via ROS parameter servers are supported (Grimaldi et al., 2024).

5. Automated Annotation, Dataset Generation, and ML Integration

Stonefish includes real-time, GPU-accelerated data annotation and export designed for ML-based marine robotics (Grimaldi et al., 17 Feb 2025, Mansour et al., 19 May 2025):

  • Semantic/Instance Segmentation: On-the-fly label mask projection per visible mesh triangulation.
  • YOLO5/COCO Annotation: 2D bounding box extraction via projected AABBs.
  • Point Cloud Labeling: Ray-cast depth → PLY/PointCloud2, per-point labels embedded.
  • High-Throughput Exports: Frames (PNG/EXR), flow maps, event data, HDF5-format for event streams (via eWiz) (Mansour et al., 19 May 2025).
  • eWiz Library: Facilitates event-data loading, encoding (event-count, Gaussian time-surface), augmentation, visualization, and built-in loss/metric calculation: Average Endpoint Error (AEE), Average Angular Error (AAE), outlier ratios (Mansour et al., 19 May 2025).

These modules support advanced workflows, such as SNN training with spike-driven losses, robust sim2real transfer, and benchmarking of RL policies via OpenAI Gym or ROS interfaces (Grimaldi et al., 17 Feb 2025, Mansour et al., 19 May 2025).

6. Application Domains, Use-Cases, and Experimental Validation

Stonefish is employed across a spectrum of research and industrial scenarios:

  • Perception: Sonar- and event-driven SLAM, DVS odometry, underwater object detection, and scene flow (Mansour et al., 19 May 2025, Grimaldi et al., 17 Feb 2025, Aldhaheri et al., 8 Apr 2025).
  • Control & Planning: PID/MPC, world-frame navigation with drag, wave/current compensation, and multitiered manipulation (AUV–manipulator coordination with inverse kinematics + acceleration feed-forward) (Grimaldi et al., 3 Jan 2026).
  • Digital Twin/Maritime Autonomy: Figure-8 trajectory tracking, COLREGs navigation rule compliance, emission-driven optimization (ZEST) (Grimaldi et al., 2024).
  • Reinforcement and Imitation Learning: Training and benchmarking of RL agents for depth-keeping, target tracking, visual servoing, using console mode for hardware-accelerated headless simulation (Grimaldi et al., 17 Feb 2025, Aldhaheri et al., 8 Apr 2025).
  • Soft Robotics: Differentiable simulation of soft Stonefish robots (FEM pipeline, neural network thrust surrogate) for millimeter-accuracy actuation and design optimization (Zhang et al., 2021).
  • Population Ecology: Agent-based EPDTA population dynamics for stonefish stock simulation, scenario testing for fishery management, scaling with multiagent systems (Buti et al., 2010).

Reported metrics include sub-0.2 m tracking errors on survey tasks (Grimaldi et al., 3 Jan 2026), event-driven perception models trained on eStonefish-scenes achieving direct AUV deployment, and RL convergence times (PPO reward > 95% in <2M steps) (Grimaldi et al., 17 Feb 2025).

7. Limitations, Extensibility, and Future Enhancements

Stonefish’s principal strengths are its extensibility, fidelity (particularly in hydrodynamics and sensor simulation), ROS-centric integration, and its suitability for high-throughput, ML-driven workflow (Aldhaheri et al., 8 Apr 2025, Grimaldi et al., 17 Feb 2025, Mansour et al., 19 May 2025). Limitations include computational cost with all plugins enabled, restriction to ROS1 as the primary interface (with ROS2 under development), use of lower-order current/wave models (external CFD required for very high turbulence), and abstraction of some manipulator and interaction physics (e.g., no explicit fluid–structure interaction or sensor fault injection yet) (Grimaldi et al., 3 Jan 2026, Aldhaheri et al., 8 Apr 2025).

Planned and emerging features include:

  • Integration of simulated sonar and structured-light vision into the onboard perception pipeline (Grimaldi et al., 3 Jan 2026)
  • Fault-injection modules for robust autonomy testing
  • Advanced, multi-agent digital twin and persistent mapping capabilities
  • Enhanced current modeling (spatially-varying, time-dependent) and FSI for close-proximity manipulation (Grimaldi et al., 3 Jan 2026)
  • Broader cross-platform API support and expanded documentation for community-driven extension (Grimaldi et al., 17 Feb 2025)

Stonefish thus represents a state-of-the-art, research-grade marine robotics simulation environment encompassing the requirements of high-fidelity physics, advanced perception, robust autonomy validation, and rigorous, scalable dataset generation for the contemporary needs of the underwater robotics and marine research communities.

Whiteboard

Topic to Video (Beta)

Follow Topic

Get notified by email when new papers are published related to Stonefish Simulator.