Skip to content

CAMP running-task view P2: map linkage (chart overlay + two-way selection sync) #129

Description

@rolker

Summary

Put the running tasks on the chart and sync selection with the tree view, so
the P1 list and the map are one view of the same live state. Builds directly on
the P1 read-only view (#127) — the signal hooks already exist.

Part of #123 (running-task display redesign). P2 (map linkage) — no editing
or nudging yet (that's P3).

Scope (three pieces)

  1. Task geometry overlay. Each marine_nav_interfaces/TaskInformation carries
    poses[] (geometry_msgs/PoseStamped[]). Render them on CAMP's QGraphicsScene
    as a read-only overlay (goto → point, survey_line → polyline, etc.), drawn
    from the existing GeoGraphicsItem machinery but visually distinct from the
    editable plan items
    — "what the boat is doing" must never be confused with
    "what I'm drafting" (the Option B rationale in Running-task display redesign (replace Heartbeat placeholder; converge on clean task round-trip) #123). The currently-executing
    task is emphasized; done vs pending are distinguishable.
  2. Two-way selection sync (hooks already in place from CAMP running-task view P1: read-only structured task tree #127):
    • Tree → map: RunningTasksView::taskSelected(QString id) → glue highlights
      (and optionally recenters on) that task's geometry.
    • Map → tree: clicking a task graphic → RunningTasksView::setSelectedTask(id).
  3. CAMP-only glue layer wiring those signals to the scene. Per Running-task display redesign (replace Heartbeat placeholder; converge on clean task round-trip) #123's
    architecture this lives only in CAMP (it needs the chart, absent in rqt)
    and attaches via the core widget's signals — never baked into the core widget,
    so the future rqt path stays clean.

Frame handling (main technical risk)

Task poses arrive in the boat's map/earth frame, not chart geo coordinates. The
overlay must convert each pose to lat/lon for the geo scene and stay correct as
the boat moves / the map origin shifts. The conversion helper already exists:
camp_ros::ROSWidget::getGeoCoordinate(pose, header). Open questions to settle in
the plan:

  • Which frame the boat populates poses[].header.frame_id with, and whether a TF
    lookup is needed per update or a single earth transform suffices.
  • Redraw cadence: the overlay updates on every TaskFeedback republish (~1 Hz) —
    rebuild vs. diff the graphics items.

Carry-over from P1

  • Guard the synthetic-group selection: P1 currently emits taskSelected(groupId)
    for intermediate group rows (which aren't real tasks). Guard this here so a
    group-row click doesn't drive the map (only hasTask nodes should).

Out of scope (later)

  • P3 editing / nudge-a-waypoint (drag a task pose → structured update back to the
    boat via TaskManagerCmd / update_task).
  • P4 mission progress.
  • rqt wrapper (additive, separate follow-up).

Dependencies

Builds on #127 (PR #128). Boat-side data path: rolker/unh_marine_autonomy#236
(PR #239) + bridge rolker/unh_echoboats_project11#344 (PR #345).

Part of #123

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions