Skip to content

Add unit tests for chart_datum_node and sea_surface_estimator #17

Description

@rolker

Summary

chart_datum_node and sea_surface_estimator have no unit tests. Key logic that should be covered:

sea_surface_estimator

  • Tide range rejection: inject chart_datum and chart_datum_mhhw TF frames, feed odometry with Z values inside and outside the plausible range, verify map_tide transform is published or suppressed accordingly
  • Buffer duration: verify transform is not published until minimum_buffer_duration is met
  • tide_estimate debug topic: verify it publishes even when the estimate is rejected

chart_datum_node

  • Dual pipeline: verify both MLLW and MHHW offsets are computed and published as TF frames
  • MHHW fallback: verify node works correctly when MHHW grids are unavailable (only MLLW published)
  • Debug topics: verify mllw_offset and mhhw_offset Float64 topics are published with correct values

Context

These nodes were recently extended with MHHW support and tide range rejection (#15, PR #16). The s57_layer costmap plugin has good test coverage for its tide offset behavior, but the upstream nodes that feed it do not.


Authored-By: Claude Code Agent
Model: Claude Opus 4.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions