Skip to content

docs: alternative ENC→costmap architecture (clean-room)#24

Draft
rolker wants to merge 5 commits into
jazzyfrom
feature/issue-23
Draft

docs: alternative ENC→costmap architecture (clean-room)#24
rolker wants to merge 5 commits into
jazzyfrom
feature/issue-23

Conversation

@rolker

@rolker rolker commented Apr 25, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds docs/design/alternative_costmap_architecture.md (749 lines).
  • Records a clean-room design for ENC → nav2 costmap pipeline, deliberately
    produced without consulting the existing implementation in this repo.
  • Captures the design process — inputs/constraints, four prep questions
    (SOUNDG/DEPARE, UNSARE, regulatory, operating area), the multi-leg mission
    scenario, and the resulting layered architecture — alongside the
    conclusions, with explicit "what's deferred" and "where confidence is low"
    sections.

The intent is to compare the two designs in a follow-up. This PR just lands
the alternative; the comparison is out of scope here.

Test plan

  • Pre-commit hooks pass (trailing whitespace, end-of-file, line endings, large-files).
  • Doc reviewed for technical accuracy against the conversation it captures.
  • Follow-up: compare against existing implementation in s57_grids / s57_layer / marine_charts.

Closes #23.


Authored-By: Claude Code Agent
Model: Claude Opus 4.7 (1M context)

rolker and others added 5 commits April 25, 2026 11:42
Captures a clean-room design exercise for generating nav2 costmaps from S-57
ENC data, produced without consulting the existing implementation, to be used
as a comparison reference. Records inputs/constraints, four design questions
(SOUNDG/DEPARE, UNSARE, regulatory, operating area), the multi-leg mission
scenario, and the resulting layered architecture with explicit deferrals.

Refs #23

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Round 2 additions to the clean-room design, prompted by follow-up questions
on cold-start time, restart downtime, and overhead clearance.

Architecture doc:
- New Overhead layer (BRIDGE / CBLOHD / CONVYR) with VERCLR + vessel
  air-draft. Tide-conditional lethal, mirroring Depth with opposite sign.
- New section 5.10 on persistence and lifecycle: persistent feature-index
  cache, cold-start estimates (~2-4 s harbor / ~8-20 s regional with
  cache, ~30-90 s without), restart downtime implications, and a deferred
  out-of-process ENC service alternative.
- v1 scope updated; new deferrals (drawbridge state, EMI hazards,
  out-of-process service).
- Layer count is now six (was five); subsections 5.6-5.9 renumbered.

New design_evolution.md tracks revision history and rationale, including
the honest accounting of what was missing before this round (overhead
clearance was a real gap; caching was implicit, not designed; air-draft
was listed but unused).

Refs #23

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a standalone neutral summary of Samuel Reed's 2018 MS thesis
"Providing Nautical Chart Awareness to Autonomous Surface Vehicles"
(UNH ECE, advised by Brian Calder and Val Schmidt). The work in this
repo is the spiritual successor to Reed's research, and many of the
same problems (DEPARE/SOUNDG conflict resolution, WATLEV qualitative
depth handling, tide-corrected charted depth, vessel-size buffering,
ENC scale and uncertainty) recur in any ENC-driven autonomy system.

The summary captures Reed's MOOS-IvP architecture, Depth-Based A*
mission planner with novel cost function balancing channel-following
against shortest-path, threat-level encoding (TL 0-5), ENC_DB /
ENC_Contact / BHV_ENC_OA reactive stack, MOOSTides tide handling,
field test results on EchoBoat and C-Worker 4, and Reed's stated
limitations (reactive local minima at multi-obstacle scenarios; planner
close approaches to point obstacles in deep water; ENC cartographic
scale issues including the breakwater installed 2006 but omitted from
ENC until 2018, and the "Breakers" label located 88 m from the actual
hazard).

The doc is descriptive only; no comparison against this repo's existing
implementation or against the alternative-architecture proposal in
this PR. Comparison is a separate planned step.

design_evolution.md updated with Round 3 entry.

Refs #23

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Reed publishes under github.com/sji367 with three public repos that
match the thesis components:

- sji367/MOOS_ENC: the OA stack (BHV_OA, BHV_OA_poly, ENC_converter,
  ENC_Search, ENC_WPT_check, AOF_Gauss). The published code splits the
  thesis's single BHV_ENC_OA into separate point/polygon behaviors.
- sji367/moos-ivp-reed: moos-ivp-extend scaffolding for the work.
- sji367/ENC_Mission_Planner: Qt5 offline mission planner.

valschmidt/encgrid is Val Schmidt's standalone C++ port of the
gridding pipeline, with notes_on_encgrid.txt surfacing implementation
details not in the thesis prose: MULTIPOINT (SOUNDG) bypass, DEPCNT
special-case linestring handling, OBSTRN/PONTON/FLODOC/DYKCON
polygon-conversion path, internal cm-scaling, geotiff orientation.

Reed's repos are essentially frozen since his thesis defense; "last
push" search timestamps are metadata changes, not code commits.

Workspace connections (verified via git log, not inferred from
filename overlap):

- camp/src/camp/astar.h was imported from Reed on 2020-02-20 (commit
  f464452, "Add initial AStar support for Sam Reid's work"), about
  14 months after the thesis. CAMP itself started 2016-10-25 by
  Roland Arsenault, predating Reed's ENC_Mission_Planner (2017-05-16)
  by seven months. Shared filenames between the two Qt projects
  exist; direction of influence on those files is not established.
- s57_tools was first committed 2021-06-25 by Roland, with no port
  history from encgrid or moos-ivp-reed. The conceptual overlap is
  genuine but the code is independent.

design_evolution.md updated with Round 4 entry that includes a
correction note on an earlier draft of this round which had inferred
lineages from shared filenames; the user flagged it and existing
memory feedback was reinforced ("git log first" before claiming code
lineage).

Refs #23

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
User's alternative design idea, captured faithfully without analysis
or padding, ready to be picked up in the next discussion.

The idea models the way a human mariner plans a voyage: assemble a
per-voyage collection of ENC cells at varying scales, fine at
departure and arrival, coarse during transit. The planner traverses
the collection by jumping to a coarser or finer chart as the boat's
position requires. Cost can be supplied to nav2 as either per-chart
rasterized costmaps or vector-direct queries (skipping rasterization
entirely).

Lists open questions for the next discussion: ENC scale metadata
mapping, chart-boundary handling, where the chart-jump decision lives
in the planner pipeline, the right nav2 plugin point, vector-direct
planning effort, no-chart-covers-gap recovery, and tide/dynamic-state
behavior across scales.

The repo now has three distinct designs on file (clean-room costmap
architecture, Reed prior art, chart-scale planner), positioned for
the eventual comparison exercise.

design_evolution.md updated with Round 5 entry.

Refs #23

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Design exercise: alternative ENC→costmap architecture (clean-room, for comparison)

1 participant