← USV Navigation Control integration · November 2026

MOOS-IvP · ROS 2 · Gazebo

Native control.
Simulation time.

Choose a waypoint.
Keep every controller in step.

A bridge between reinforcement learning and native marine guidance. MOOS-IvP selects the heading and speed, a native PID produces actuator commands, and Gazebo advances only after the matching reply arrives.

The waypoint control pathSource-based architecture diagram
01 / Policy · once every 2 simulated seconds Local waypoint + cruise speed

Convert the action to a fixed world target; keep the mission goal unchanged.

02 / Native guidance · every 0.25 seconds BHV_Waypoint → IvP helm solver

The pRLWaypoint application returns heading and speed for the current vessel sample.

03 / Native control · same vessel sample pExtendMarinePID → thrust + rudder

Pass the acknowledged guidance result to PID and match its response.

04 / Simulation Apply commands → advance Gazebo → pause

Read the new vessel state and repeat the control cycle.

01 / A fixed target, refreshed guidance, and one simulator clockDefault waypoint cadence · source diagram

01 / Connect learning to native marine control

Let the policy plan.
Let the helm guide.

A training environment must be able to pause, reset, and advance a controller along with its simulated vessel.

My USV Navigation architectures place learning at several levels of the control stack. This integration supports two of them: a policy can request heading and speed directly, or select a local waypoint for native MOOS-IvP guidance to follow.

The main systems problem is timing. A controller that keeps integrating while Gazebo is paused no longer acts on the state the policy observed. Here, every accepted request carries simulation time and a complete state snapshot. Native computation advances with those requests.

My role
Navigation architecture design
Project focus
Native control integration · simulation lifecycle
Training runtime
ROS 2 Jazzy · Gazebo Harmonic
Controller runtime
ROS 2 Humble · MOOSDB · native C++ applications
Default planning interval2 s

One policy-selected world waypoint stays fixed.

Native control cadence4 Hz

Fresh guidance and PID feedback within that interval.

Updates per decision8

Control ticks before the next scheduled waypoint.

These values describe the default configuration. An episode can end earlier when a control tick detects a collision or final-goal arrival.

02 / Choose where the policy acts

Two decisions.
One native controller.

The direct method chooses speed and a heading change. The waypoint method chooses a distance, relative bearing, and cruise speed; the environment converts these into one world-frame target at the start of the planning interval.

Policy interface → native controlSeparate action contracts
Direct heading / speedPolicy motion target

Convert the relative heading command to an absolute reference.

Heading + speed
Local waypoint planningPolicy waypoint + speed

pRLWaypoint invokes BHV_Waypoint and the upstream IvP solver.

Heading + speed
Shared native PID pathpExtendMarinePID → Gazebo actuator adapter

Thrust percent and compass-positive rudder degrees become simulator commands.

The direct method can also use its internal Python PID. Selecting native MOOS records that controller choice in the run bundle; the Gazebo waypoint method requires the native path.

The waypoint application compiles the upstream HelmEngine and uses the actual BHV_Waypoint behavior. It runs a decision when a sample arrives and reads the chosen heading and speed from the helm report. The request-driven wrapper supplies the lifecycle around those upstream algorithms.

A meaningful transfer boundary

The fast pure-simulation waypoint environment uses an approximate geometric follower and Python PID. Moving its policy to Gazebo selects native MOOS guidance, so that controller change needs its own evaluation.

03 / Make the reply belong to the sample

One state.
A matching answer.

The ROS–MOOS bridge carries request and response packets. Each packet identifies the session and sequence; the request includes simulation time, vessel feedback, and its target. The environment waits for the corresponding reply before applying any new actuator command.

01

Use the exact guidance result.

In waypoint mode, the client first obtains the native helm decision. It sends that heading and speed, together with the same vessel feedback and timestamp, to PID. A failed helm request cannot advance PID with an older reference.

02

Retry without integrating twice.

A byte-for-byte repeat of the latest request returns the cached native reply. Reusing its sequence with different data is rejected. Delayed replies from a different session or step cannot supply control.

03

Reset the whole control state.

An episode reset creates fresh native helm and PID state and acknowledges zero output. It can rewind simulation time. The first regular sample then starts from that reset, without inherited integral or waypoint-capture history.

04

Stop on a broken transaction.

Invalid data, rejected requests, and acknowledgement timeouts fail the step. The environment stops actuator output, and the waypoint client requires both native controllers to be reset before continuing.

Waypoint identity also has meaning. Reusing an ID requires the same coordinates and speed. Once the native behavior captures that target, the response holds zero desired speed until a new ID arrives, even if the vessel coasts outside the capture radius.

04 / Coordinate a shared simulation world

Several vessels.
One clock.

Each vessel has its own MOOSDB, helm, PID, and ROS topic namespace. The multi-vessel environment collects every active vessel’s control reply and applies those commands before advancing their shared Gazebo world once.

Control deadlines are anchored to the start of the policy decision. Eight ticks therefore target eight successive 0.25-second boundaries; network waits and repeated pause operations do not accumulate into a longer planning interval. Collisions and final-goal arrival are checked after each tick.

Keep state local

Separate controller histories.

Per-vessel databases and sessions isolate opposite turn requests, reset state, and captured waypoints. One vessel’s reply cannot satisfy another vessel’s transaction.

Keep time explicit

Advance from simulation samples.

Native MOOS scheduling services messages and status. Elapsed wall time during a pause does not issue an extra helm decision or integrate another PID sample.

The Humble controller service and Jazzy simulator use separate containers and workspace overlays. They exchange standard ROS String messages over a shared ROS domain. The actuator adapter owns the final vehicle-specific conversion from native command units.

05 / Verify the boundary at each layer

Check the contract.
Then the motion.

The project includes C++ tests against the native PID and waypoint helm, Python tests for client transactions and planning cadence, and documented live Gazebo checks. Each layer answers a different question.

On October 25, 219 Python core checks passed, including the native-client contracts. The available image then lacked the required native applications. A November 4 capability check now finds both applications, each reporting protocol version 1. That probe checks executable availability; the native and Gazebo behavior below remains documented earlier verification.

The native controllers and client protocol are unchanged. The shared Gazebo backend now reads body velocity from odometry twist, with pose differences as a fallback and a 0.15-second guard after a teleport. This feedback change is separate from the protocol capability check.

Verification recorded in the project · October 2026
LayerWhat it checksEvidence scope
Native C++ coreSimulation-time PID, heading wrap, real waypoint decisions, capture, retries, and reset.Source tests and documented passing checks.
Python client / environmentMatching replies, exact helm-to-PID references, failure handling, held targets, and eight control ticks.In-process transport doubles and pure simulation.
Live Gazebo integrationOne and two vessels, 2.000-second cadence, independent reset, pause behavior, and train/evaluate/resume.Documented runtime checks through the native service.
Fixed waypoint probeA target 10 m ahead; closest approach of 0.63 m over 80 updates / 20 simulated seconds.Documented Gazebo check; capture reported, followed by coasting.

The live results above come from the project’s retained validation notes. They establish controller routing and simulator behavior. Learned navigation performance is evaluated separately in the seven-method study.

The current boundary

Physical-vessel deployment and actuator calibration remain unvalidated. The fixed-target probe still coasts after capture. Humble/Jazzy discovery emits a known ROS graph serialization warning, although the documented String control transactions completed without protocol errors or timeouts. Live fusion into the navigation policies also needs separate validation.

Navigation architecture design: Jerry Chang. MOOS-IvP’s waypoint behavior and helm solver are upstream components. The extension repository retains its original authorship and JetSeaAI notices; this case study focuses on the training integration and control lifecycle.

MOOS-IvP integration / Part of USV Navigation

Give the policy
a dependable interface.

Explore the navigation study Back to all projects