← Perception Stack ROS 2 · Recorded vessel data

Point clouds · Object tracking · Maritime perception

LiDAR
Processing.

Measure motion.
Question the centroid.

A moving vessel sees a different piece of the seawall with every scan. This pipeline turns sparse returns into clusters, tracks and obstacle evidence—and checks whether an apparent moving object is actually standing structure.

01 / The starboard bank · Anping harbourRecorded May 2025 · replayed October 2026

01 / Geometry under motion

A stable bank.
An unstable outline.

A cluster centre can move even when the object does not. On a harbour wall, the visible arc changes with the vessel’s position and the LiDAR’s vertical rings.

I built and maintained the LiDAR repository within my Perception Stack. It handles scan alignment, geometric detection, multi-object tracking, collision-risk outputs and occupancy grids. Its native ROS 2 interfaces also support standalone operation.

The retained bag is a useful stress case: about 400 points per scan, with most returns on the starboard seawall 20–60 metres away. The engineering challenge is to preserve that sparse evidence without turning changing visibility into false velocity.

My role
Built & maintained the repository and its stack integration
Core tools
ROS 2 · Python · NumPy · SciPy · CuPy / cuML
Algorithms
DBSCAN · IMM Kalman tracking · Hungarian assignment
Evidence
Two retained bag replays · source and metric audit, October 25, 2026

02 / From scan to evidence

Align the frame.
Then interpret the returns.

The scan, IMU and odometry must describe the same time. Deskew compensates motion within a scan; roll and pitch are removed before geometry is evaluated. Clusters and obstacle points enter the world frame only when aligned odometry is available.

LiDAR processing pathSource timestamps · metric odometry frame
Time & geometryPointCloud2 + IMU + odometry

Deskew → gravity alignment → sensor-frame azimuth and hull gates

Geometric frontendOutlier removal → voxel sampling → DBSCAN

Range-aware filtering, ring-normalized clustering, footprint boxes and persistent-return share

Obstacle evidenceFiltered points
Measured occupancy

Instant and temporal grids; occupied or unknown cells

Object interpretationClusters + history
IMM + Hungarian

Track confirmation, measured motion and standing-structure checks

Downstream interfacesTracks · risk · predictions · observations

Native LiDAR messages; shared-schema bridges for the fusion layer

The occupancy branch uses filtered obstacle points before object interpretation. Elevated structure can remain an obstacle even when it is excluded from tracked objects.
What the tracker keeps explicit

Two motion models.

An interacting multiple-model filter mixes constant velocity and constant turn-rate predictions. Gated Hungarian assignment gives detections a one-to-one association with tracks.

Confirmation and recovery.

A new track needs two associated detections before publication. Lost tracks can briefly hibernate and be revived, then must be confirmed again. Wrong-frame inputs are rejected; clock rewinds and long gaps reset tracking state.

Uncertain motion stays visible.

Motion starts as unknown. A fit to measured centres over four seconds needs at least six samples spanning one second. Moving state requires 0.5 m/s and a three-standard-error significance threshold; hysteresis reduces switching.

CPU and GPU paths.

CuPy and cuML accelerate supported operations when a CUDA device is available. CPU implementations preserve the pipeline on other hosts. Backend availability is checked before taking the GPU path.

03 / Decisions that change the output

Use the evidence
the sensor actually provides.

01 / Sparse returns

Respect the scan geometry.

Point spacing grows with range. Outlier removal normalizes neighborhood distance by range, while DBSCAN scales vertical separation when the VLP-16’s rings are farther apart than its clustering radius. Horizontal distances stay unchanged.

02 / Partial visibility

Model an uncertain centre.

A long wall or partially visible hull has a less reliable centre along its long axis. Measurement covariance grows with the cluster’s footprint, reducing the false velocity caused by a sliding visible outline.

03 / Standing structure

Look for old returns.

The clusterer measures overlap with world-frame cells hit 3–6 seconds earlier. Repeated overlap identifies standing structure even when its centre slides. The rule excludes footprints longer than 8 metres because a moving ship can overlap its own earlier returns.

04 / Honest occupancy

Keep unobserved cells unknown.

A point marks an occupied cell. Missing returns do not prove free water. Temporal evidence decays with elapsed sensor time, including during dropouts, and clears on a clock rewind.

A downstream contract

Only tracks classified as moving publish velocity. Static and unknown tracks publish zero velocity; a coasting nonmoving track stays at its last measured position. Risk and prediction therefore consume the motion decision instead of raw filter drift.

04 / Inspect the implemented pipeline

One shoreline.
Two views.

The left view follows the starboard bank; the right shows the same replay from above. White points accumulate over three seconds so the thinned cloud is readable. Coloured points and boxes identify clusters and tracks, while dark cells show occupancy.

02 / Bag time 600–720 s · full frameRecorded bag replay · 120 s · silent · 10 fps
Read a description of the replay

As the vessel travels through the harbour channel, white returns trace sections of the seawall. Coloured clusters appear along the bank, change shape and sometimes lose their identities. The top-down panel shows their location relative to the ego vessel and LiDAR occupancy. The scene was captured from RViz in software rendering during the October 21–22 material collection. It reprocesses the May 16, 2025 bag.

RViz’s text labels display the filter’s internal speed, including on static tracks. The published velocity and velocity arrows use the motion gate. Read the coloured track geometry and published motion evidence separately from that label.

Inspect the recorded RViz interface
The original interface makes the displayed layers inspectable alongside the composed replay views.

05 / Recorded-bag regression

Fewer moving walls.
Measurable limits.

The supplied review reported only 5% of land-track updates as static. Two retained replays after the fixes reach 82.6% and 81.5%.

Land updates marked static82%

81.5–82.6% across the two retained replays

HIGH / CRITICAL entries13–15

LiDAR risk entries per recorded window; the regression limit is 40

Observed track lifetime5.2 s

Run 1 median across 209 IDs; run 2 is 5.5 s across 206 IDs

03 / Recomputed from 21,234 land-track updates across two replays. These are repeated updates of tracks; they are not independent object detections.

The current proportions and track lifetimes were recomputed from the supplied recordings on October 25. The land mask comes from approximate map polygons, so this measures behavior near the bank rather than object-level classification accuracy. The earlier 5% is a reported baseline with no raw baseline recording in the supplied materials.

Retained regression recordings · approximately 130 seconds each
MeasureRun 1Run 2
Land updates · static / total8,846 / 10,7148,573 / 10,520
Land updates · unknown14.1%14.6%
Distinct published track IDs209206
Median observed track lifetime5.24 s5.55 s
HIGH / CRITICAL risk entries1315
Repeated observation stamps / observations0 / 1,2891 / 1,286

Lifetimes run from the first to last published update for each ID inside the recording, so window boundaries can truncate them. Risk entries can repeat the same physical track. The metric windows begin around bag time 585 s; the illustrative video begins at 600 s.

04 / Run 1 · Most returns belong to the bank. The AIS vessel path is shown for context; this figure does not establish LiDAR tracking accuracy on that vessel.

06 / What remains open

Better motion evidence.
Still partial visibility.

01

Some bank tracks still trigger risk.

The remaining 13–15 high-risk entries sit on bank tracks missed by the standing-structure rule. The 8-metre length guard protects long moving vessels, but also prevents some long shoreline clusters from being classified as structure.

02

Stable classification is not stable identity.

Median lifetimes remain around five seconds. Sparse rings, changing visibility and fragmentation still produce short tracks. Two replays of one harbour transit cannot establish general detection recall or tracking performance across vessels, weather and sea states.

03

A learned detector has a separate evaluation path.

An optional OpenPCDet SECOND branch runs beside DBSCAN using the same aligned cloud. Its outputs stay on shadow topics for comparison, and it is disabled by default. The production tracker continues to consume geometric clusters; field validation and calibrated uncertainty remain prerequisites for promotion.

One sensor within a larger system

LiDAR contributes local geometry and obstacle evidence. The radar pipeline supplies complementary range tracks, the camera pipeline supplies visual observations, and Sensor Fusion reconciles their timestamps, uncertainty and identities.

07 / Evidence & reproducibility

Keep the claim
close to its source.

The footage and retained recordings come from the October 21–22 collection using the May 16, 2025 vessel bag. This page audits the implementation and recomputes LiDAR metrics from those recordings. The reviewed LiDAR revision adds documentation and media to the captured revision; its processing code is unchanged.

Captured LiDAR source: 327a6e0. Reviewed LiDAR source: f560e7184dc7. Captured stack: fa1d765. The source review and recorded-data reanalysis are distinct from a new vessel test.

Credits

Repository development and maintenance: Jerry Chang. The implementation uses ROS 2, NumPy, SciPy, scikit-learn, CuPy and cuML; the optional learned branch uses OpenPCDet and SECOND. RViz displays the recorded sensor data and computed outputs. The motion chart is regenerated from retained regression data.

LiDAR Processing / Perception Stack

Measure the geometry.
Connect the evidence.

Explore Sensor Fusion Back to Perception Stack