Skip to content

markers: DELETEALL clears every namespace (fix #59 parity regression)#75

Merged
rolker merged 1 commit into
jazzyfrom
feature/issue-70
Jun 8, 2026
Merged

markers: DELETEALL clears every namespace (fix #59 parity regression)#75
rolker merged 1 commit into
jazzyfrom
feature/issue-70

Conversation

@rolker

@rolker rolker commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the DELETEALL spec-violation regression from the camp→camp2 markers
replacement (#59). Addresses the headline must-fix of #70; the remaining marker
port items in that issue stay open.

The bug

visualization_msgs spec: a DELETEALL marker clears every marker
regardless of namespace. camp did this; the camp2 markers that replaced it (PR5)
route every marker — DELETEALL included — to the single MarkerNamespace
matching the message's ns (conventionally empty). So a publisher clearing
itself with DELETEALL only cleared the "" namespace, and markers in every
other namespace lingered as stale visuals
on the operator's map.

Fix

Detect DELETEALL in Markers::updateMarker and fan it out to all
MarkerNamespaces (each already clears its own markers). One change, no behavior
change for ADD/MODIFY/DELETE.

Test

  • colcon build + colcon test48 tests, 0 failures.
  • Markers isn't unit-testable in isolation (needs a live Node + scene tree),
    so no gtest.
  • Sim-verify: publish markers in multiple namespaces, then a DELETEALL —
    every namespace's markers clear (not just the empty one).

Remaining #70 items (separate, not in this PR): DELETE object/namespace pruning,
TEXT scale.z font sizing, already-expired/empty-frame ingest drops,
unknown-action warn.


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

Per the visualization_msgs spec a DELETEALL marker clears ALL markers regardless
of namespace. The camp2 markers (which replaced camp's in #59) routed every
marker — including DELETEALL — to the single MarkerNamespace matching the
message's ns (conventionally empty), so markers in every other namespace lingered
as stale visuals on the operator's map. Detect DELETEALL in Markers::updateMarker
and fan it out to all MarkerNamespaces. Regression flagged in the #59 parity
audit (docs/parity/markers.md); confirmed live.
Copilot AI review requested due to automatic review settings June 8, 2026 03:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a regression in camp2’s ROS markers layer so that visualization_msgs::Marker::DELETEALL clears markers across all namespaces, matching the visualization_msgs behavior and restoring parity with legacy camp behavior.

Changes:

  • Detect DELETEALL in Markers::updateMarker and broadcast it to every existing MarkerNamespace.
  • Preserve existing routing behavior for ADD/MODIFY/DELETE (namespace-scoped handling unchanged).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rolker rolker merged commit 94439f8 into jazzy Jun 8, 2026
1 check passed
@rolker rolker deleted the feature/issue-70 branch June 8, 2026 03:49
rolker pushed a commit that referenced this pull request Jun 9, 2026
Completes the camp->camp2 markers parity gap flagged in #70 (the DELETEALL
fan-out was already handled by PR #75).

src/camp2/ros/markers:
- DELETE (and DELETEALL) now remove the Marker objects outright, and
  Markers::pruneEmptyNamespaces drops any namespace they empty. The port
  previously only cleared a Marker's visual children, leaking empty
  Marker/MarkerNamespace husks into the scene tree and the Layers list. A
  DELETE for an untracked namespace is now a no-op instead of creating one
  (and an empty Marker) just to delete from it.
- addMarkers drops markers already expired on arrival (non-zero-stamp guard
  mirrors Marker::checkExpired) and markers with an empty frame_id, ported
  from camp's markers_converter drop checks.
- updateMarker warns (throttled) on unrecognized actions instead of silently
  creating dead state, matching the camp original. Throttles now use the
  node clock so intervals track sim time under use_sim_time.

src/camp2/map (Layer):
- Add Layer::removeFromMap(), the canonical ADR-0003 removal (detach through
  the Map model so rowsAboutToBeRemoved fires, drop from the scene, then
  deleteLater). A raw delete of a Marker/MarkerNamespace -- both are Map
  model rows -- would leave the Layers-tab tree view with dangling rows
  (use-after-free). The existing 'Remove' context action now shares this
  path instead of duplicating it. setMapItemParent(nullptr) detaches from
  childItems() synchronously, so pruneEmptyNamespaces still sees the
  emptied namespace within the same pass.

TEXT_VIEW_FACING font sizing (the remaining #70 item) is left to #76/PR #78,
which owns the TEXT rendering path in marker.cpp.

Build + colcon test pass (48 tests, 0 failures). The markers scene-tree logic
needs a live Node + QGraphicsScene + Map model, so it is sim-verified rather
than unit tested, per PR #75's precedent. Parity matrix in
docs/parity/markers.md updated.

Closes #70
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.

2 participants