Hierarchical
Choose speed and course. MPC tracks those references with fixed cost weights.
Reinforcement learning · Model predictive control · MOOS–IvP
Where learning
meets control.
Seven architectures explore how much a navigation policy should decide: actuator commands, motion targets, nearby waypoints, or the priorities of a predictive controller.
01 / Choose the policy’s responsibility
Obstacle avoidance changes when a policy can ask for a course, adjust an optimizer, or command the vessel directly.
I designed navigation architectures that combine reinforcement learning with classical control. This project compares those interfaces in one vessel simulator and carries trained policies into ROS 2 and Gazebo. A shared workflow saves the policy, normalization state, and resolved configuration for evaluation and resumed training.
02 / Seven ways to connect learning and control
Model predictive control (MPC) predicts vessel motion and solves for commands under actuator and obstacle constraints. Four couplings give the learner different access to that controller.
Choose speed and course. MPC tracks those references with fixed cost weights.
Choose speed, course, and five weights balancing tracking, obstacle proximity, and actuator effort.
Choose speed and rudder. A speed loop proposes thrust; a predictive filter checks the command and can select a backup maneuver.
Choose a local goal, three weights, and speed. SAC learns through environment rewards; gradients do not pass through the solver.
Three baselines use simpler control paths. “E2E” retains a goal-seeking controller blended with its learned command.
Choose forward thrust and yaw commands. The learned contribution increases near obstacles and the goal.
Choose speed and a heading change. A PID controller converts them to thrust and rudder.
Choose a nearby point and cruise speed. Hold the point while guidance and PID update beneath the policy.
The three tracking couplings share a 13-second prediction horizon: four 0.25-second stages followed by twelve 1-second stages. LiDAR arcs become obstacle circles. The solver includes actuator limits, rudder slew, a clearance margin, and terminal stopping distance. Failed solves and unmet clearance trigger explicit fallback decisions. The zero-collision result below applies to the single-vessel evaluation; these mechanisms do not establish a general safety guarantee.
A limited speed request still allowed the old MPC to accelerate through turns. Predicted surge is now bounded at 7.7166 m/s. In the retained zigzag probe, peak speed fell from roughly 10.6 to 7.77 m/s.
Penalizing rudder changes alone shifted activity into thrust. The revised controller raises both change penalties. The reference-to-command interface remains the same, but older MPC bundles are rejected because their controller formulation differs.
The action now specifies a speed from −1 to 7.7166 m/s. Drag feedforward and a two-second speed loop produce a thrust proposal before the recoverability check. Retraining still leaves many stalls, including policies that stop before the filter needs to intervene.
The benchmark’s MOOS-style methods use internal Python control; waypoint guidance is a geometric approximation. The native bridge case study covers actual MOOS–IvP helm and PID execution with Gazebo.
A shared benchmark aligns scene generation, dynamics, actuator limits, collision thresholds, and stopping rules. The preparation also corrected MOOS steering direction, baseline spawn validity, and rudder slew. A policy comparison can otherwise reward differences in the environment.
LiDAR sees an arc of a cylinder. A circle centered on that arc’s centroid misplaces the obstacle boundary. Visible-arc fitting estimates the hidden center, accounts for fitting residuals, and splits overlapping returns when possible. That geometry changes the constraints the MPC sees.
The safety filter checks whether the proposed action leaves a clear backup maneuver: stopping, backing off, or turning. Obstacle memory covers the scan’s blind sector. Its poor arrival rate in this pilot still exposes a central tradeoff: preserving room to stop does not teach the policy how to get past the obstacle.
03 / Separate sensing from control
The input used by the measured comparison
Up to ten objects, each with eight features
Fourteen-feature objects and two occupancy grids
Pure simulation creates synthetic observations. Live B/C inputs depend on the external fusion pipeline and its ROS messages. The comparisons here use perception A. A separate two-vessel study now tests learned encounter behavior; live B/C navigation remains unvalidated.
04 / A shared task, explicit budgets
The four MPC couplings were retrained on November 2 after the controller changes. They are compared with the retained October 23 baselines on the same task: three training seeds per method, each evaluated on scenes 10000–10049. Each scene starts 120 m from its goal among three static obstacles.
Arrival means entering a 30 m goal radius; collision means crossing 15 m of obstacle-surface clearance. No progress, divergence, and the 512-second limit also end episodes. These are nominal 200k-step training pilots.
Cost shaping has the highest mean arrival rate, 84.0%, with seeds spanning 64–94%. Hierarchical spans 64–92% and E2E–MPC 56–88%. Those overlapping ranges do not establish a reliable ordering. The differences from the October pilot also fall within the seed spread.
| Method | Goals (%) | Goal range (%) | Collisions (%) |
|---|---|---|---|
| Hierarchical | 74.0 | 64–92 | 0.0 |
| Cost shaping | 84.0 | 64–94 | 0.0 |
| Safety filter | 26.0 | 4–42 | 0.0 |
| E2E–MPC | 77.3 | 56–88 | 0.0 |
| Direct E2E | 46.7 | 44–48 | 48.7 |
| Heading & speed | 2.7 | 0–6 | 56.7 |
| Waypoint planning | 0.0 | 0–0 | 20.0 |
All four MPC couplings record zero evaluation collisions. The safety filter reaches 26.0% of goals; its remaining episodes stall. Training with exploration still recorded collisions in cost shaping and E2E–MPC. Collision avoidance and useful progress need separate measures.
Budgets count policy decisions. Waypoint decisions span 2 simulated seconds; the other methods use 0.25 seconds. Equal step counts therefore represent different sailing time and computation. Three seeds and one scene set describe this pilot’s behavior, with convergence still unmeasured.
05 / Inspect the same starting scene
Scene 10000 puts an obstacle just beyond the start. All four revised MPC couplings reach the goal; the three baseline recordings end in collision. The panels show selected policies, so the aggregate results above remain the basis for comparison.
Four coupling panels appear above three baseline panels. The November 3 export uses the revised 200k-step coupling policies and retained October 1M-step baselines, selecting each method’s best training seed on the 50-scene evaluation. Ties use the retained export’s selection. These examples illustrate behavior with unequal training budgets. Playback follows recorded simulation time at 4×; finished panels hold their final frame.
On scene 10001, six methods arrive while the safety filter stalls after 61.75 simulated seconds. Waypoint planning eventually arrives after about 109 seconds. A successful path in one scene does not resolve the broader progress problem.
Choose a scene and controller to inspect its original recording at full size. The selected training seeds and budgets match the seven-panel films.
Cost shaping · training seed 0 · 200k steps · goal at 22.25 simulated seconds.
Blue marks the travelled path; the dot marks its start. Red circles are obstacles and the green dashed circle is the 30 m arrival region. The vessel heading marker is enlarged. Collision uses a 15 m clearance threshold beyond the obstacle surface.
06 / Learned policies in a shared world
The November study trains each coupling with two vessels, two static obstacles, and random encounters. Each of two training seeds is evaluated for 20 worlds, or 40 vessel episodes. These are separate policies and scenarios from the single-vessel comparison.
| Coupling | Arrivals of 40 per seed | Collision worlds of 20 per seed |
|---|---|---|
| Hierarchical | 37 / 37 | 1 / 1 |
| Cost shaping | 38 / 39 | 1 / 0 |
| Safety filter | 28 / 25 | 0 / 2 |
| E2E–MPC | 33 / 39 | 3 / 0 |
No vessel hits a static obstacle, but every coupling records vessel-to-vessel collisions across its two seeds. A collision ends both vessels’ episodes. The remaining failures are stalls, including 23 across the safety filter’s two policies.
The controller treats the other vessel’s observed circle as stationary throughout its prediction. Retained collision traces show braking beginning only 22–28 m between vessel centres, close to the 20 m collision threshold. Motion prediction for these MPC obstacle constraints remains unimplemented.
The SAC policies change their closed-loop behavior when replayed on CPU instead of their original CUDA device. E2E–MPC seed 0 changes from 33 arrivals and three collision worlds to 39 arrivals and none; seed 1 changes from 39 arrivals and none to 33 arrivals and two collision worlds. Small numerical differences can change an encounter. With only 20 worlds per policy, these counts do not support a stable ranking.
The retained reports do not record an explicit evaluation seed, so they do not establish a common held-out world set across policies. The download identifies each report and the inference device. Live multi-vessel navigation with these trained policies remains unvalidated.
07 / Carry the policy into another simulator
The October 21 cost-shaping capture shows a trained policy running through ROS 2 in Gazebo Harmonic. RViz exposes the LiDAR returns, fitted obstacle circles, and MPC plan. The capture notes report 11 arrivals and one stall across 12 episodes in this world. This footage predates the November MPC changes and does not validate the retrained policies.
E2E’s Gazebo scenario adds fast crossing balls and different starting distances. Across four completed episodes, the captured policies reach no goal. The 1M-step policy below slows near the cylinders and stalls. These captures establish execution and expose transfer limits; their different scenarios do not support a comparative Gazebo success rate.
The November runtime now takes body velocity from Gazebo odometry and guards the first 0.15 seconds after teleport resets. The MPC runtime also limits astern speed near 1 m/s. Documented open-water checks cover those changes; the films here remain the earlier October captures.
The first panel follows the vessel in Gazebo; the second shows its observations and track in RViz. On phones, the full views stack vertically. The cost-shaping view also shows predicted motion and obstacle circles. Gazebo advances in lockstep at 0.24–0.31 simulated seconds per recording second. These silent clips play the recording at 4×, approximately real-time vessel motion. The worlds, episode starts, and moving obstacles differ from the pure-simulation benchmark.
08 / Evidence, limitations & related work
Reviewed November 4, 2026. The current charts use 12 November coupling reports and the retained October baseline reports. The source, evaluation records, selected replays, and controller investigations were checked together. Original October exports remain available for comparison.
On November 4, all 743 existing Python tests passed in an isolated Docker container against the current source. These checks exercise code and workflow contracts; they do not repeat the full training campaigns or validate live Gazebo performance.
On October 25, 219 core tests passed in Docker and four selected cost-shaping/direct-E2E episodes exactly reproduced the October recordings. Those checks apply to the earlier snapshot. The November charts report the retained training campaigns; the full training and evaluation campaigns were not repeated for this page.
The nominal vessel and actuator scale are target-derived. Real engine response, reverse-thrust behavior, and physical-vessel performance are unvalidated. Next steps are to predict other vessels’ motion, resolve sensitivity to the inference device, and test the revised policies on matched Gazebo tasks. More seeds, scenes, and training are needed before drawing conclusions about general navigation performance.
Navigation architecture design: Jerry Chang. Training uses Stable-Baselines3 and PyTorch; optimization uses CasADi/IPOPT. The ROS 2 and Gazebo environment uses the project’s usv-toolbox submodule. MOOS–IvP supplies upstream guidance and helm components. Captures and figures derive from the project’s simulation records.
USV Navigation / Learning and control