Planning Against the Forecast: Closing the Flow Reality Gap for Weak Marine Vehicles

Underwater gliders, small drones and slow surface boats often move no faster than the water or air around them. For these vehicles the current matters more than the map. Planners that exploit currents already exist, both classical and learned, but they are almost all tested in simulations that assume the flow they plan with is the flow they will meet. In reality the vehicle plans with an ocean forecast and then drives through the actual ocean. We argue that for flow-dominated vehicles, the main simulation-to-reality gap (the drop in performance when something built in a simulator meets the real world) is not the robot's thrusters or sensors. It is the difference between the forecast current and the true current. That difference has spatial structure and repeatable statistics, and the vehicle can partly observe it from how it drifts.

The proposal is to treat this forecast error as the object of study. We would build a benchmark that measures it and a planner that corrects for it. The benchmark plans on an archived ocean forecast and executes in the later best-estimate current field for the same days. The planner does three things. It learns a model of how forecasts tend to be wrong. It updates that model online from the vehicle's own observed drift. It then chooses routes that stay safe across the remaining plausible flows, not only the most likely one. The method is designed as a plug-in, so it can sit on top of a classical flow-aware planner or a reinforcement-learning policy. Part of the research question is which of the two benefits more.

Core Claim

In flow-aware navigation, a planner should be trained and certified against realistically structured forecast error and should estimate that error online, rather than being randomized over independent current perturbations. When vehicle speed is comparable to or below current speed, we expect this to cut stranding and constraint violations substantially relative to replanning on the raw forecast. We expect this while keeping most of the energy savings that flow-aware planning buys. When the vehicle is much faster than the current, we expect the advantage to vanish. That prediction is part of how the claim can be falsified.

Where the Existing Work Stops

The flow-planning literature motivates the problem but does not address it. Several learned marine planners train in currents taken from real oceanographic products and never test transfer:

All three use the same current field for training and testing, so none of them measures a gap. Classical optimizers such as EOPSO with segment-wise speed allocation (Energy-Optimized Path Planning for Fully Actuated AUVs in Complex 3D Environments) assume time-invariant flow. The one line of work that faced real currents, level-set reachability on MIT MSEAS forecasts in the Arabian Sea (Optimal Planning and Sampling Predictions for Autonomous and Lagrangian Platforms and Sensors in the Northern Arabian Sea), relied on shore-side forecasting with data assimilation and operator-in-the-loop replanning. It had no onboard mechanism for the residual error between forecast updates. That residual error is our target.

The sim-to-real literature supplies the method but was developed on land.

  • SPiDR: A Simple Approach for Zero-Shot Safety in Sim-to-Real Transfer penalizes safety costs in proportion to disagreement across randomized dynamics models. It reports 26.1x fewer violations than plain domain randomization on a Unitree Go1. We reuse its pessimism idea, but our ensemble is drawn from a fitted forecast-error distribution that is updated online, not from hand-set parameter ranges. This also addresses SPiDR's sensitivity to its penalty coefficient, because the ensemble spread shrinks as evidence arrives.
  • Sim-to-Lab-to-Real: Safe RL with Shielding and Generalization Guarantees shields a policy with learned reachability margins. Its obstacles are static and its space is isotropic (costs do not depend on direction); in a strong current the safe set is carried along by the flow.
  • Using inaccurate models in reinforcement learning corrects a crude simulator with time-dependent biases fitted to real trajectories. Its authors note that its guarantees break under stochastic disturbances such as currents. Our online error estimate is a probabilistic, spatially correlated version of that bias correction, which is our answer to that stated limitation.

One tension shapes the action space. RARA: Zero-shot Sim2Real Visual Navigation with Following Foreground Cues found that outputting waypoints to a classical tracker transferred far better than outputting velocities. The flow-planning work, however, shows that pure geometric waypoints give up the energy benefit of riding currents. We therefore have the planner output a heading and a through-water speed per segment, and leave thruster lag to a low-level tracker. This abstraction is tested directly as an ablation.

Research Program

The first component is the forecast-to-hindcast benchmark. From the CMEMS Global Ocean Physics Analysis and Forecast product we pair each archived forecast issue with the later analysis covering the same days. The planner sees only the forecast; the vehicle is simulated in the analysis. Missions are drawn over GEBCO bathymetry, with grounding and exclusion zones as hard constraints. We add a POMgcs-based 2D setting to match the N-DDQNP study and a SODA/ETOPO1 3D setting to match EOPSO.

The analysis is itself a smoothed model product, so this gap is a lower bound on reality. We therefore add a stress tier that injects synthetic small-scale eddies into the analysis. We also randomize vehicle hydrodynamics (drag, thruster lag, speed cap) over conventional ranges. Separating these two sources lets us measure how much of the total gap each one contributes.

The second component is the forecast-error model. Let $\hat u(x,t)$ be the forecast current at position $x$ and time $t$, and $u(x,t)$ the analysis current. We fit a conditional generative model $p(e \mid \hat u)$ to the historical errors $e = u - \hat u$. The model starts as a spatiotemporal Gaussian process whose correlation lengths depend on lead time. It is upgraded to a learned sampler only if it is shown to be miscalibrated.

On board, each position fix compared against dead-reckoned through-water motion gives a noisy sample of the local current. These samples update the model to a posterior over $e$ along and ahead of the vehicle.

The third component is the pessimistic planner. We draw $K$ flow fields $u_k = \hat u + e_k$ from the posterior. The planner then picks a control sequence $a$ that solves

$$\min_a \; \frac{1}{K}\sum_{k=1}^K J(a; u_k) \quad \text{s.t.} \quad \frac{1}{K}\sum_{k=1}^K c(a; u_k) + \lambda\, \mathrm{std}_k\big[c(a; u_k)\big] \le \delta.$$

Here $J$ is the energy and time cost under flow $u_k$, $c$ is the safety cost (grounding, stranding against a current the vehicle cannot beat, entering an exclusion zone), $\lambda$ weights the disagreement across samples, and $\delta$ is the safety budget. The constraint is SPiDR's disagreement penalty applied to flow samples. Because the posterior tightens as drift is observed, the planner's caution falls automatically as evidence accumulates. That is the mechanism we propose instead of hand-tuning $\lambda$.

We instantiate this constraint in two host planners:

  • a receding-horizon level-set or time-dependent graph planner, where the constraint is applied to reachability fronts computed per sample;
  • a PPO policy trained on error-model samples, with the constraint enforced through a Lagrangian.

Baselines

The do-nothing reference is flow-agnostic A* on the bathymetry chart, whose waypoints are passed to a PID tracker. It shows the cost of ignoring currents altogether. Underwater Vehicle Path Planning Based on Bidirectional Path and Cached Random Tree Star Algorithm and EOPSO both argue it performs poorly in flows. We expect it to fail in most missions where the current exceeds vehicle speed. It sets the floor.

The strongest classical competitor is receding-horizon flow-aware replanning on the raw forecast: level-set reachability as in the MSEAS work, re-solved every hour of mission time with the latest forecast, with identical vehicle and mission sets. This is what a careful oceanographic operator would actually do. On a land-based fleet one might instead use the SPiDR hardware numbers, but no reported result was found on Lacuna for any planner under forecast-to-hindcast transfer. The file reports the MSEAS system's forecast skill (25% lower salinity RMSE) and 4-day trajectory validations, not navigation success rates. To beat this baseline, the method must cut safety violations by a statistically clear margin at matched or better mission success, at no more than a modest energy premium.

The strongest learned competitor is the hybrid TD3 planner of Path Planning for USVs in Complex Marine Environments Based on an Improved Hybrid TD3 Algorithm. We reimplement it and retrain it on forecast fields with standard independent domain randomization of current magnitude and direction. It receives the same environment-step budget and the same hyperparameter search budget as our PPO variant. Its reported in-distribution figures are path length 564.17 m and minimum obstacle clearance 5.77 m on static Map 1, with no reported transfer numbers. N-DDQNP reports a 14.91% shorter path than DQN, again in-distribution. We will first reproduce these numbers in-distribution to validate the reimplementations. We then report how far they fall under the forecast-to-hindcast shift.

Three ablations isolate the key ingredients:

  • Error structure: replace the fitted forecast-error model with independent perturbations of matched variance.
  • Online correction: freeze the error model at its prior, so there is no drift-based updating.
  • Pessimism: set $\lambda = 0$ and optimize the sample average only.

A fourth ablation swaps the heading-and-speed action space for pure waypoints, to test the RARA tension directly.

Why not just…?

Why not just use domain randomization over current speed and drag? It is the default, and SPiDR's hardware results show that on land it leaves many more violations than pessimistic training, because it never steers the policy away from regions where the models disagree. In flows there is an added problem. Independent perturbations do not reproduce the spatially coherent, lead-time-dependent errors of real forecasts, such as an eddy displaced by tens of kilometres. The structured-versus-independent ablation measures this directly. If independent perturbations of matched variance perform as well, the error model is unnecessary, and we would report that.

Why not just replan on the latest forecast with level-set reachability? This is the most serious threat. The MSEAS field work shows it works at the scale of days. Its weakness is between forecast updates, where the vehicle trusts a field it can already see is wrong. If hourly or faster replanning on the raw forecast closes most of the gap, the contribution shrinks to the online error estimate. We therefore test the online correction inside this same classical planner, not only against it. This makes the comparison about the correction itself, not about learning versus classical planning.

Why not just give an LSTM policy memory and let it infer the current, as in dexterous manipulation? Memory policies do infer hidden parameters online (Learning Dexterous In-Hand Manipulation). But inference alone does not stop the policy from committing, early in a mission, to a region it cannot escape if the estimate is wrong. We include a recurrent PPO baseline without the disagreement constraint. If it matches our planner on violations, the explicit posterior is not earning its complexity.

Why not just identify the vehicle's hydrodynamics and run model predictive control? System identification fixes the vehicle model, but the dominant error we target is in the environment. Our split of the total gap into its flow and vehicle components tests this. If most of the gap turns out to come from the vehicle, then system identification plus model predictive control is the right answer, and the proposal's premise is wrong.

Proposed Experiments

The first decisive check establishes that the gap exists. Every baseline is evaluated in-distribution (planning and executing on the forecast) and then under transfer (planning on the forecast, executing in the analysis). We report the drop in mission success, the stranding and grounding rates, and energy used, across a sweep of the ratio of vehicle speed to current speed from 0.5 to 3. If the drop is small even at low ratios, the premise fails before any method is compared.

The second check is the main comparison. On held-out forecast issue dates and held-out regions, we compare our pessimistic planner in both hosts against all baselines and ablations. We report success, violations per mission, energy and time, and calibration: whether a predicted success probability of 0.9 corresponds to about 90% realized success. We expect gains to concentrate at speed ratios near or below one and to vanish above about two.

The third check is the stress tier with injected small-scale eddies. It tests whether the online correction still helps when the error lies outside the fitted distribution, the out-of-bounds regime in which the literature reports domain randomization failing. If a surface vehicle is available, a short harbor or river trial will compare the forecast-replanning baseline with our classical-host variant on repeated transects, using the local current forecast. This shows whether the ranking from the hindcast benchmark survives contact with real water. We treat the trial as confirmatory, not as the primary evidence.