← Perception StackMarine radar · Recorded vessel data

Radar perception · Tracking · CPU / GPU computation

Radar
Processing.

Follow the returns.
Question the motion.

A ROS 2 pipeline that turns marine radar returns into tracks and occupancy. Its hardest problem appears along the shoreline: a changing cluster can look like a moving object even when its returns stay in place.

01 / Returns, objects and persistent structureVessel recording · Anping harbour, Taiwan

01 / A rotating view of a moving world

One scan.
Several kinds of evidence.

The Halo radar reports a planar scan about once every 1.05 seconds. Between scans, the vessel moves, a boat moves, and the visible section of a quay changes.

I built and maintain the radar repository and its integration into the Perception Stack. The pipeline filters XYZI returns, aligns them in a world frame, clusters individual scans, tracks objects and publishes occupancy, collision risk and structured observations.

The implementation has a readable CPU reference graph, a single-node CPU/GPU path, and a cluttered-scene variant with a static map. These share output contracts so the surrounding stack can consume any backend.

My role
Repository development, maintenance & stack integration
Core tools
ROS 2 · Python · NumPy / SciPy · CuPy
Input
Halo XYZI scans · planar marine radar
Evidence
May 2025 vessel bag · October 2026 replays

02 / Different questions, different outputs

Keep new objects.
Remember stable returns.

A moving boat may never hit the same voxel twice. Detection therefore uses the current scan; persistent returns build the temporal view. Requiring persistence before detection would erase exactly the targets the vessel needs to notice.

From XYZI to observationsSensor stamp · metric odom frame
Prepare the scanValidate → filter → planar transform

Finite values, range and hull filters; heading and position at the scan stamp

Current scanFind objects now
0.5 m voxels → adaptive DBSCAN

Range measured from the radar; persistence retained as an attribute

Recent scansMeasure persistence
2.5 s rolling window

Two scan hits qualify a voxel for persistent occupancy

Tracking and downstream productsGated association → tracks → risk & occupancy

Explicit unknown / static / moving states; shared outputs for fusion

The Halo is planar. Applying the vessel's full roll and pitch to distant returns would create artificial height changes, so the default transform uses heading and translation.

The default 3–300 m filter removes the driver's near-field disc and limits computation. Detection reaches that radius; the default occupancy window is 300 m across. A grid's unknown cells remain unknown because an absence of radar returns does not establish free water.

03 / A stable identity needs more than a centroid

The bank stays still.
Its cluster moves.

01 / Motion

Keep an unknown state.

The tracker waits for five measured positions and checks the path's straightness and speed. Before enough evidence arrives, velocity stays zero and the motion state stays unknown. Coasting does not manufacture measurements.

02 / Structure

Look back at the returns.

Clusters carry the share of returns overlapping older scans. Repeated high overlap marks standing structure even when the visible centroid slides along a bank. Entry and exit thresholds differ to reduce flicker; long footprints are excluded from this rule.

03 / Association

Allow a moving boat to change shape.

A fixed 4 m extent gate split the yacht as its radar box changed. Moving tracks now allow a proportional size change, while position agreement remains gated by covariance.

04 / Identity

Suppress duplicate births.

A detection explained by a confirmed track does not start another identity. Confirmed tracks merge when their boxes overlap and their positions agree under the covariance gate. The older identity survives.

The core tracker uses constant-velocity Kalman prediction and Hungarian assignment. Clock rewinds and long input gaps reset its state rather than extrapolating across an outage. This timestamp discipline also matters downstream in Sensor Fusion.

04 / Two replays of one harbour window

Count identities.
Keep the uncertainty.

The retained regression runs cover 130 seconds of a harbour transit with a yacht ahead and structures along both banks. Both runs produce the same yacht association result: 82 of 84 eligible radar batches contain exactly one track within 15 m of its interpolated AIS position.

One nearby track97.6%

82 / 84 eligible radar batches, in each run

Duplicate nearby tracks0

Eligible batches with two or more tracks, in each run

Land updates still unknown50–51%

Motion state remains undecided in roughly half the updates

02 / Unknown motion remains visible in the result

The historical review reported exactly one yacht track in 38% of batches. That baseline comes from the retained review summary; the two current report files are included below. The 15 m association rule and sparse AIS interpolation make this an identity regression check, not a precision or recall score for all vessels.

03 / Raw returns and the persistent harbour outlineBag 630–660 s · 1× playback · silent
Read a description of the replay

The vessel advances between banks of amber radar returns. Green boxes mark clusters; blue tracks are static and orange tracks are moving or unknown. The right-hand view shows returns persistent across several scans over a 400 m-wide area. Dark cells show occupancy. The clip is actual RViz output from a CPU replay of the recorded vessel bag, encoded at the original 10 frames per second.

05 / Audit the work included in a timing

A faster backend.
An explicit budget.

CuPy moves filtering, transformation, incremental persistence and clustering onto the GPU. A cell-indexed neighbor graph avoids a dense all-pairs distance matrix. The default tracker stays on the CPU, so speeding up point processing leaves a substantial shared cost.

04 / Synthetic benchmark · retained RTX 5060 Ti measurements
A useful finding from the evidence review

The collector's GPU subtotal omits neighbor-graph construction. Including that recorded stage changes 99.6 ms to 113.4 ms at 150,000 points. The page preserves the original JSON and shows the corrected sum. Neither figure is a measured end-to-end sensor latency.

The benchmark times stages separately, and its tracking stage creates a tracker and applies three updates. At 10,000 input points, the same audited sum is 9.1 ms on CPU and 14.8 ms on GPU. Backend choice depends on workload; these synthetic measurements do not establish a universal crossover point.

How the implementation handles GPU failure

Continue on the CPU.

Automatic mode can reprocess a failed scan on the CPU, transfer persistence history and retain the cluttered pipeline's static map. Diagnostics report the failure and backend state. Required-GPU mode instead treats unavailable startup as fatal.

Preserve a common contract.

Both paths publish the same messages. The reference graph supplies behavior for parity tests; the fused node reduces message and transfer overhead. A configurable retry delay backs off after GPU failures.

06 / What remains unresolved

Better evidence.
Limited coverage.

01

Unknown motion is a real limitation.

Short-lived and coasting tracks often fail to collect enough measured positions. Zero published velocity preserves the interface contract, but an unknown track has not been shown to be stationary.

02

One route cannot establish detection quality.

The regression has one AIS reference vessel and approximate land polygons. Wider weather, sea-state, target-size and encounter coverage is needed to assess missed targets and generalize the tuned gates.

03

Occupancy and risk are evidence products.

Radar grids mark occupied evidence and leave other cells unknown. The shared risk calculation assumes point targets and constant velocity; it does not model hull clearance, uncertainty propagation or marine right-of-way rules.

Inspect the full window's track updates
05 / Repeated updates reveal where uncertainty persists

07 / Source and measurement trail

Keep the conditions
beside the result.

The displayed footage and regression measurements were collected on October 21–22, 2026 from the May 16, 2025 vessel bag. The October 25 source audit found only README and media additions after the recorded radar revision. Runtime code matches that revision.

Credits

Repository development and maintenance: Jerry Chang. The implementation uses ROS 2, NumPy, SciPy and CuPy. Figures derive from retained measurements; video and screenshots come from the implemented system in RViz. The sensor hardware, middleware and numerical libraries are third-party components.

Radar Processing / Perception Stack

One source.
A larger picture.

Explore Sensor Fusion Back to Perception Stack