Context
Follow-up surfaced during the pre-push review of rolker/mru_transform#25
(datum resolution chain off-VDatum).
s57_layer caches tide_offset_ and only updates it when a fresh
chart_datum → sea_surface lookup succeeds and differs by
tide_invalidate_threshold_. When the lookup throws (the chart_datum frame is
no longer broadcast / has expired from the TF buffer), it logs a throttled WARN
and keeps the last tide_offset_:
try {
auto transform = tf_->lookupTransform(chart_datum_frame_, sea_surface_frame_, ...);
...
} catch (const tf2::TransformException& e) {
// throttled WARN, tide_offset_ unchanged
}
Before #25, off-coverage simply meant chart_datum was never published, so
tide_offset_ would never have been set. After #25, chart_datum is published
in more places (VDatum, polygon config, lake_datum param) and can legitimately
disappear while underway when the boat moves into an area where nothing
matches (the node intentionally stops broadcasting chart_datum and publishes
datum_source == "none"). So the costmap can silently keep correcting against a
stale offset from a different region — a newly-reachable "stale data" path.
Proposal
Treat datum disappearance as a first-class transition:
- Subscribe to the
datum_source topic (std_msgs/String, latched) published by
chart_datum_node. When it reports "none", clear/invalidate tide_offset_
(and ideally invalidate the tide-corrected layer) rather than holding the last
value.
- Alternatively, treat a sustained lookup failure (frame absent beyond a timeout)
as invalidation.
Acceptance
Related: rolker/mru_transform#25, rolker/mru_transform#27.
Authored-By: Claude Code Agent
Model: Claude Opus 4.8 (1M context)
Context
Follow-up surfaced during the pre-push review of
rolker/mru_transform#25(datum resolution chain off-VDatum).
s57_layercachestide_offset_and only updates it when a freshchart_datum → sea_surfacelookup succeeds and differs bytide_invalidate_threshold_. When the lookup throws (thechart_datumframe isno longer broadcast / has expired from the TF buffer), it logs a throttled WARN
and keeps the last
tide_offset_:Before #25, off-coverage simply meant
chart_datumwas never published, sotide_offset_would never have been set. After #25,chart_datumis publishedin more places (VDatum, polygon config,
lake_datumparam) and can legitimatelydisappear while underway when the boat moves into an area where nothing
matches (the node intentionally stops broadcasting
chart_datumand publishesdatum_source == "none"). So the costmap can silently keep correcting against astale offset from a different region — a newly-reachable "stale data" path.
Proposal
Treat datum disappearance as a first-class transition:
datum_sourcetopic (std_msgs/String, latched) published bychart_datum_node. When it reports"none", clear/invalidatetide_offset_(and ideally invalidate the tide-corrected layer) rather than holding the last
value.
as invalidation.
Acceptance
tide_offset_is cleared/invalidated when the datum becomes unavailable(
datum_source == "none"or sustained lookup failure)Related:
rolker/mru_transform#25,rolker/mru_transform#27.Authored-By:
Claude Code AgentModel:
Claude Opus 4.8 (1M context)