Sample post - replace with your own writing.
Most localisation literature assumes a robot moving through a world that stays put. A hull-cleaning ROV inverts that: the robot clamps onto the world, and the world — several thousand tonnes of ship — surges, heaves and swings on its mooring lines while you work. Your job is not "where am I on the seabed" but "where am I on the hull", in a hull-fixed frame that is itself dancing.
This post is a tour of what broke, in the order it broke, and the stack that eventually held.
Everything you trust is unavailable
Start with the obvious eliminations:
- GPS — gone the moment you submerge. Not degraded; gone.
- Magnetometers — you are magnetically coupled to a steel plate the size of a football pitch. The compass doesn't drift, it commits to being wrong.
- Acoustic beacons (USBL) — workable for coarse position, but multipath off the hull, the quay wall and the seabed gives you outliers measured in metres, on a vehicle that needs centimetres.
- Visual SLAM, naively — hull plating is feature-poor by design. Anti-fouling paint is a uniform field of red-brown, and the water column adds a green fog that eats contrast beyond about two metres.
What survives: a DVL (Doppler velocity log) locked to the hull rather than the seabed, wheel odometry from the magnetic crawler tracks, a pressure sensor for depth, a fibre-optic gyro that doesn't care about steel, and a camera that is occasionally useful.
Hull-locking the DVL
A DVL normally measures velocity over ground. Ours points at the plate 40 cm away and measures velocity over hull — which is exactly the frame we want. Two problems:
- Curvature. Near the bilge radius, the four beams hit surfaces at wildly different ranges and angles. Beam-level outlier rejection matters more than any downstream filter.
- Weld beads and sea chests. A beam crossing a weld sees a step change; a beam crossing a sea-chest grating sees the inside of the ship. Both look like a sudden 30 cm/s velocity spike.
The fix was boring and effective: per-beam range gating against a rolling plate-distance estimate, plus a median-of-history sanity check before anything touches the filter.
def gate_beam(beam, plate_dist, history):
"""Reject DVL beams that stopped seeing the plate."""
if abs(beam.range - plate_dist) > PLATE_GATE_M: # weld / sea chest
return None
v_med = median(history[-N:])
if abs(beam.velocity - v_med) > K_SIGMA * mad(history[-N:]):
return None # spike
return beam
The error-state filter
The core is an error-state Kalman filter, mechanised in the hull frame. Track odometry and gyro drive the prediction; gated DVL velocities and pressure-derived depth-on-hull correct it. The states that earn their keep:
- 2D position on the (unrolled) hull surface
- heading in the hull tangent plane
- per-track slip factors, estimated online
- gyro bias
Track slip is the sneaky one. Magnetic adhesion varies with paint thickness and biofouling, so slip is not a constant you calibrate — it's a state you estimate. On a freshly painted patch the tracks grip like rack and pinion; over a colony of tube worms they skate. Letting the filter learn slip online halved our loop-closure error on the first survey lawn we tried it on.
Vision as a seasoning, not a meal
The camera earns its place twice. First, weld seams: they run in known directions (frames vertical, seams horizontal-ish), so a cheap line detector gives you a bearing fix — a compass substitute that works because of the steel rather than despite it. Second, loop closure at the lane-turn: you revisit the previous cleaning lane's edge, and the cleaned/fouled boundary is the highest-contrast feature on the whole ship. Free, centimetre-grade lateral correction, every lane.
What I'd tell past me
- Instrument the failure, not the estimate. We logged filter innovations from day one and it paid for itself weekly.
- The hull frame is the product. Nobody buying a cleaning report cares about earth coordinates.
- Every sensor on a work-class crawler is lying part-time. The architecture question is not "which sensor is right" but "who is on shift right now."
None of this is exotic. It's the same estimation toolbox everyone learns, aimed at a world that happens to be vertical, magnetic, and covered in barnacles.