Cubit Underwater Lab: a swarm simulator for autonomous underwater drones piloted by ArduSub

Yachting & Marine · Underwater robotics

Cubit Underwater Lab: a swarm simulator for autonomous underwater drones piloted by ArduSub

Cubit Underwater Lab simulates swarms of one, three or four autonomous underwater drones governed by the real ArduSub firmware, with measurements produced by instrument models and a sea calibrated on the site’s own data, repeatable sample by sample.

Result · 14 minute read

Four BlueROV2 Heavy underwater drones in formation above the Holland No. 5 wreck, lit by their own lights, in the Cubit Underwater Lab simulator
Four drones in formation over the Holland No. 5 wreck, at about 120 m depth, seen from the external observer of the first vehicle; each drone carries its own lights, its own sensors and its own autopilot.
In this article

Cubit Underwater Lab is a simulator for swarms of autonomous underwater vehicles (AUVs) developed by Cubit Innovation Labs on Gazebo Harmonic and ROS 2 Jazzy. The reference drone, a BlueROV2 Heavy, follows the six-degree-of-freedom dynamic model of marine vehicles and is governed by the real ArduSub firmware, which receives its measurements from instrument models just as it does on board the physical vehicle. Swarms of one, three or four drones operate in georeferenced worlds built from the real bathymetry of the site of interest, and a web interface, the Control Room, allows vehicles and environments to be configured, missions and campaigns to be run, and telemetry, images and sonar to be observed.

The sea is described by general laws with parameters taken from the site’s measurements: equations of state for seawater, a current calibrated on ADCP series, JONSWAP-spectrum waves, the geomagnetic field and water optics. Vehicle dynamics and the DVL read the same water velocity, so forces and measurements are consistent, and every run is repeatable sample by sample.

Purpose and scope of use

The simulator serves to develop and test, in a controlled and reproducible environment, the functions an AUV performs at sea, alone or in a swarm: navigation estimated from onboard sensors, depth and station keeping, waypoint route execution, infrastructure inspection. Simulation replaces sea trials in the phases where the cost, the risk or the poor repeatability of real conditions make field testing inefficient.

The choice to run the real autopilot, rather than a model of it, and to feed it measurements produced by instrument models, rather than the vehicle’s exact position, makes the results transferable: the same parameters, the same MAVLink telemetry and the same QGroundControl ground stations apply to the simulated vehicle and to the physical one. Typical uses are tuning inspection missions on pipelines, walls, wrecks and industrial structures, studying navigation in the presence of current, waves and loss of bottom lock, testing coordinated operations of several vehicles and producing labelled synthetic data.

Overall architecture

The system is organised on two levels with separate roles. The compute engine runs the simulation: Gazebo Harmonic with the DART physics engine at a fixed 1 ms step and GPU sensor rendering, one ArduSub SITL instance per vehicle, the sensor chains and the mission service. The frontend gives users access through the Control Room and the HTTPS gateway. The browser opens a single destination, the frontend over HTTPS; commands, telemetry, numerical sonar data and video streams all pass through the gateway, and the compute engine can sit on a network unreachable by clients.

Separating the levels allows growth in two directions. Vertically, the number of vehicles grows with the power of the single compute engine, in particular the GPU that draws cameras and sonars and the processor that integrates the physics. Horizontally, each vehicle’s chain is a set of independent services that communicate with the world over DDS and MAVLink on the network, and sensor drawing can be split across separate rendering processes: chains and rendering can therefore be distributed over several compute nodes, while keeping a single world and a single sea state.

Diagram of the Cubit Underwater Lab execution chain: frontend with Control Room, definitions and composition; compute engine with Gazebo Harmonic, ArduSub SITL, instrument models, ROS 2 bridges, mission service and QGroundControl
Execution chain. In the frontend the versioned definitions are composed into a release, whose activation starts the world on the compute engine; in blue the vehicle control loop, closed in lockstep between Gazebo, instrument models and ArduSub; the mission service and the QGroundControl stations talk to the autopilot in MAVLink, while telemetry and images reach the browser through the gateway.

The vehicle and the autopilot

The reference vehicle is the BlueROV2 Heavy, a fully actuated platform with eight T200 thrusters in a vectored arrangement, four tilted horizontal and four vertical, used in the simulator as an AUV: missions are executed autonomously by the autopilot, with no pilot and no tether. Full actuation allows attitude and position to be imposed independently, a favourable condition for developing sensors and navigation.

Vehicle definition page in the Control Room with the layout of the eight T200 thrusters and the mass, volume, thrust and inertia parameters
Vehicle definition: layout of the eight T200 thrusters (four vectored horizontal, T1–T4, and four vertical, T5–T8) and the mass, volume, thrust and inertia parameters of the reference configuration.

The dynamics are an instance of the standard marine vehicle model (Fossen 2011), with the hydrodynamic coefficients of the experimental model published by von Benzon et al. (2022) for the BlueROV2 Heavy. Added mass, which for this vehicle exceeds half its own mass in the vertical direction, is declared in the inertia tensor and integrated by the physics engine together with the body mass, a choice that avoids the numerical stiffness of an acceleration-proportional term treated as an external force. Linear and quadratic damping act on the velocity relative to the water: current and waves thus transmit their forces to the vehicle through the relative motion.

ArduSub in the loop

The autopilot is ArduSub, built at a pinned commit and run in SITL (software-in-the-loop) mode. The link plugin forwards the inertial measurements to SITL and receives from it the commands for the eight motors, in lockstep with the simulation step: physics and autopilot advance together and runs are repeatable. The internal estimate is ArduSub’s extended Kalman filter (EKF3), corrected by the depth sensor, magnetometer and DVL measurements; the Ping2 is connected as a range finder towards the bottom. The vehicle navigates without GPS, as when submerged: the geodetic origin is set at activation and the position is estimated entirely from onboard sensors.

The marine environment

Each sensor receives only the quantities present at its own aperture, with no access to the sea state, the seed or the parameter tables, as happens with the real instrument. The hydrodynamic forces on the vehicle and the DVL measurement in water-track mode read the same value from the same channel, which carries the sum of current and wave orbital velocity: forces and measurements are consistent by construction. Every source of randomness uses a counter-based generator, a pure function of seed and index, so runs are repeatable sample by sample.

The laws of the sea and of the sensors do not depend on the location; the site enters through the data. A new world is built by importing the site’s bathymetry as a georeferenced GeoTIFF DEM; water column profiles are generated from the site’s mooring measurements, current parameters are calibrated on its ADCP series, wave height, period and direction are set from buoy statistics and the magnetic field is computed at the new position with the WMM2025 model.

Reference scene

The reference scene represents a 2,048 × 2,048 m area at the head of the Monterey canyon, with depths from 4.8 to 185.5 m and USGS bathymetry at 2 m spacing where available and 5 m elsewhere. The area was chosen for the public availability of high-resolution bathymetry and multi-year oceanographic series and for the variety of seabeds and slopes. The Sensor World variant adds to the bathymetry seven inspection structures, including a pipeline, a subsea manifold and the historic wreck Holland No. 5.

Bathymetry map of the head of the Monterey canyon with the controlled sector and the inspection structures
World derived from the reference scene: bathymetry of the canyon head, 1,024 × 1,024 m controlled sector with the inspection structures, depth range, sea provider, optical class and geodetic origin.

Water column, currents and waves

Temperature and salinity profiles come from the MBARI M1 mooring in Monterey Bay (2014-2023 series), in a summer profile with a marked thermocline and a winter profile with a mixed column. The internal tide at the M2 frequency shifts the profile vertically with an amplitude of 20 m over the 12.42 hour period, and at 60 m depth the speed of sound oscillates by about 3 m/s over the cycle, with systematic effects on acoustic measurements.

The horizontal current is the sum of four terms calibrated on the ADCP series of the same mooring: a mean term per depth, four astronomical tidal constituents, the inertial and internal tide bands and a broadband residual. The stochastic state of the current belongs to the world, not to the individual body: nearby vehicles receive the same realisation of the current, an essential condition for swarms. The sea state follows a JONSWAP spectrum with a significant height of 2.0 m and a peak period of 11.4 s, from the statistics of NDBC buoy 46042; wave pressure remains detectable by the depth sensor down to about 150 m.

Water optics

The forward camera applies, for each colour channel, the revised underwater image formation model of Akkaynak and Treibitz (2018), with attenuation of the direct signal, the sunlight veil and the backscatter veil of the lights, and with the coefficients of Jerlov water classes 1C and 3C. The computation runs on the GPU, from which only the finished image is downloaded.

Comparison of two images of the same seabed scene: above, the camera with water optics, dark and attenuated; below, the raw camera, with the seabed and the wreck lit by the lights.
Holland No. 5 wreck at about 120 m depth: above, the image with Jerlov 1C water optics, with attenuation, light veil and blur with distance; below, the raw camera, with scene lighting only.

The sensors

Every sensor is governed by a versioned contract that declares the sea quantities required at its aperture, the factory constants with their origin, the frame and the publishing rate. The sea serves the physical quantities; the instrument derives its own, applying the measurement model and the errors of the individual unit. The same modelled measurement feeds both the display and the autopilot.

Sensor Measurement model
IMU angular rates and accelerations with noise and dynamic bias
Magnetometer WMM2025 field in the body frame with hard and soft iron, noise, saturation, quantisation
Bar30 depth sensor physical pressure at the aperture, instrument model, conversion to depth
A50-class DVL four Janus beams at 22.5°, bottom-track and water-track, acoustic chain per beam
Ping2 acoustic altimeter 115 kHz echo with time of flight and detection threshold
Dual multibeam DAVE with CUDA, horizontal and vertical sections
Forward camera 1920 × 1080 image at 15 Hz with water optics on GPU

DVL

The DVL reconstructs velocity from the four radial components with the Janus geometry and evaluates each beam with the sonar equation (Urick 1983); the velocity is valid with at least three beams out of four, as in the real product. Doppler conversion uses the instrument’s calibration sound speed, so that variations in the real sound speed of the water, including those induced by the internal tide, produce the corresponding scale error: in the reference scene the scale factor drift over the M2 cycle is 0.2%.

Multibeam sonar

The two multibeam sonars, horizontal and vertical, form their image with DAVE’s physical point-scatterer model (Choi et al. 2021; Zhang et al. 2022): speckle and reverberation arise from the coherent sum of the contributions, with no noise added afterwards. The two sections feed a local margin analysis, with the minimum distances to the right, left, above and below the vehicle represented as a safety volume around the drone.

Images from the two 300 kHz multibeam sonars, horizontal section and vertical section, with echo intensity on a colour scale
Images from the two 300 kHz multibeams with a 30 m range: above, the horizontal section (±65° right and left), below, the vertical section (±65° up and down). Echo intensity is on a colour scale; the mottled structure is the speckle produced by the coherent sum of the scatterers.
Safety panel of a drone next to the wreck with the safety volume and the analysis of horizontal and vertical margins
Safety panel of a vehicle next to the wreck: on the left the local safety volume with the returns of the horizontal (orange) and vertical (blue) sonar in the sensor frame; on the right the analysis of horizontal and vertical margins, with minimum distance, direction of the nearest obstacle and clear or alert sectors.

The swarm

Every vehicle in the swarm has its own complete chain: an ArduSub SITL instance with a dedicated system identifier, the sensor models, its own copies of the camera and sonar images, an external observer and a QGroundControl ground station, connected to the autopilot with the same protocol as the real vehicle. The sea, the bathymetry and the objects are shared: the vehicles see the same current and the same waves, and see one another in their sensors.

The configured swarm sizes are one, three and four vehicles; the tables of names, ports and identifiers are sized for larger swarms. With three vehicles the nominal formation is an equilateral triangle with 4 m sides, with four a square with 4 m sides. Each vehicle runs its own copy of the mission, offset according to the formation, with its own navigation and its own autopilot.

Real-time display in the Control Room with four drones over the wreck: cameras, external view, two multibeams and vehicle position
Real-time display with four drones over the wreck. At the top the status bar with the simulator, the four autopilots and the sonar streams; in the panels the camera with water optics, the external observer’s view of the formation, the two multibeams, the raw camera and the vehicle position; on the left vehicle modes and health status.

Missions, campaigns and results

A mission references precise versions of the world and the vehicle, the initial pose, the cruise speed and a sequence of waypoints in ENU coordinates, each with a navigation, inspection or hold action. The catalogue includes reference missions on the Sensor World structures, each available for one and for four drones, among them the mission on the Holland No. 5 wreck.

Planning a four-drone mission in the Control Room: nine-waypoint route over the bathymetry with transit and inspection actions
Planning a four-drone mission over the calibration and inspection structures: nine-waypoint route in ENU coordinates over the world’s bathymetry, with transit (blue) and inspection (orange) actions, estimated duration and execution commands.

Starting a mission opens a fresh simulation session from scratch, prepares each vehicle’s pose, realigns its navigation estimate, loads the route into the autopilot and starts AUTO mode. The mission service declares an objective reached on the basis of the waypoint completion events emitted by the autopilot, not of the vehicle’s true position.

Campaigns repeat the same mission in sequence, restoring the initial pose before each case. Every run produces the executed definition, the outcome, the events and, for each vehicle, the navigation samples and the underwater camera image.

Functions of the operator interface

The Control Room covers the whole workflow, from preparing the environment to analysing results. The operator defines routes and actions on the georeferenced map, chooses the number of drones, starts missions and follows their phases, organises campaigns and consults the outcomes and artefacts of the runs. The real-time display gathers the vehicle and environment quantities in a navigation panel and the two sonars with margin analysis in a safety panel.

Navigation panel and environmental quantities of a drone during a mission in the Control Room
Navigation panel and environmental quantities of a vehicle during a mission: attitude and heading, autopilot status, IMU, depth, height above the bottom from altimeter and Ping2, DVL velocity with bottom lock, motion relative to the water, magnetic field, temperature, salinity, pressure, sound speed and mean column density, with the trend over the last 60 s; at the bottom the channel rates and the video stream diagnostics.

Vehicle variants and environments are created by derivation from an existing configuration, choosing the installed sensors, the site bathymetry, the water column, the current, the waves, the optical class and the swarm size. Cameras and sonars reach the browser as WebRTC streams activated on demand and shared, so that a second browser watching the same view does not duplicate traffic to the compute engine.

Environment configuration page in the Control Room: number of vehicles, optical class, profile season, current and waves
Environment configuration: number of vehicles in the world, optical class of the water, season of the water column profile, enabling of current and waves, height, period and direction of the sea state.

Performance

The physics engine advances at a fixed 1 ms step and the world runs with no artificial real-time cap: simulation speed is set by the actual load. On the compute engine used for the measurements, in mission sessions with cameras and sonars active, the following real-time factors were measured.

Configuration Real-time factor
One vehicle 2.5-2.9
Three vehicles 1.2-1.3
Four vehicles, with all cameras being watched about 0.8

Performance comes from targeted work on the rendering chain, including water optics computed on the GPU and rendering on demand, so that a camera or sonar nobody is listening to is not drawn. Computing time remains dominated by sensor drawing, which grows with the number of vehicles; this is why swarm capacity follows the graphics power of the compute engine and the number of nodes across which rendering is split.

Reproducibility and configuration control

Every execution can be traced to an immutable release, identified by a unique code and accompanied by the cryptographic fingerprints of the compiled world, the models and the libraries it depends on. The release fixes world, vehicle, sea parameters, sensor profile and swarm size.

Third-party components are pinned to a revision: Gazebo Harmonic, ROS 2 Jazzy, ArduSub and DAVE, the last with twelve Cubit patches, including axis conventions and CUDA compilation for the latest generation of GPUs. The laboratory’s verification programs recompute the sea laws in an independent implementation and compare them sample by sample.

Worlds, data and uses

The separation between general models and site data makes the simulator applicable to any operating area: ports, offshore fields, pipeline routes, archaeological sites, coastal areas. A new site requires the bathymetry and the oceanographic series available for the area; with the same chain, libraries of scenarios per customer or per mission and parametric scenarios of current and sea state can be built. Reproducibility by seed and ground truth make the simulator a source of labelled synthetic data for sonar and optical perception algorithms, and browser access makes it possible to offer the simulation as a service: demonstrations to clients, pilot training, mission rehearsal on behalf of underwater inspection operators.

The coefficients of the six-degree-of-freedom model come from the experimental literature, and the simulator has a data contract for adopting computed coefficients: seven artefacts, including inertia, hydrodynamics and propulsion map, with units, frame, sign convention, validity range and origin of every quantity, a validator that rejects incomplete datasets and a fingerprint that ties every run to the dataset that fed it. The contract is the route by which coefficients computed with CFD simulation enter the simulator, for example from virtual captive towing and forced oscillation tests, together with their provenance and validation report.

Text prepared with the help of artificial intelligence and reviewed by Cubit.