Commit Graph

4 Commits

Author SHA1 Message Date
9a67eee148 wip: state before depth cleanup
Uncommitted work as it ran on the KIT robot until 2026-10-20: the ROC observed_volume tuning patch on top of 63707c9 and the DepthCameraObstacleLayer plugin (clone of tsengapola/costmap_depth_camera noetic, B6 window fix), its 17 unit tests and the CMake wiring. Kept as one commit so the cleanup that follows has a recoverable starting point; not meant to be pushed.
2026-10-20 09:36:53 +07:00
63707c968c fix(depth): free voxels on clearArea/footprint, accept far returns as behind
clearArea and footprint clearing only wrote the 2D cells, so the voxels and
evidence points stayed MARKED and the next column update brought the phantom
back. VoxelLayer now frees the voxel column and its evidence in both paths
(footprint only for observed_volume; legacy unchanged).

A valid return deeper than depth_valid_max_z_m kept every evidence point
unknown, so phantoms with nothing within 3 m behind never cleared. New key
depth_far_return_is_behind (default false) counts such a return as behind a
point that lies at least free_margin_m inside the trusted range.

Replay of the 2026-10-15 bags: real phantoms 62 -> 53, static-cell dropouts
unchanged, object kept on 10/11 FOV exits as before.
2026-10-15 16:58:23 +07:00
5e38857e48 feat(depth): certify evidence points instead of whole voxels (phase 1)
The whole-voxel rule never clears a voxel whose box crosses the image edge.
A person bending over to lift an object leaves high voxels at the top edge
of the image: in the 2026-10-15 lift bag 0 of 54 phantom cells cleared.

- DepthEvidenceStore keeps, per marked voxel, the 6 per-axis extreme points
  plus the most recent ones, keyed by a window-independent cell index.
- DepthVisibilityChecker::classifyPoints: Free only when every evidence
  point projects with a full patch inside the usable image and sees valid
  depth behind it; any surface in front keeps it, invalid depth keeps it.
- Paired marking drops points within depth_marking_border_px of the image
  edge, so every kept point can be re-checked from the pose that saw it.
- Voxels without evidence keep the whole-voxel rule; evidence is erased on
  clear, pruned on rolling shift and every 50 frames.
- New keys depth_evidence_points_enabled (default false),
  depth_evidence_points_per_voxel (8, 6..16), depth_marking_border_px
  (must be > depth_projection_margin_px when enabled); startup log and
  counters (by_evidence, border_dropped_points, evidence_voxels).
- Tests: depth_evidence_store_test; checker and layer tests for the image
  top cut, border drop, rolling shift and a still-visible object.
2026-10-15 13:22:28 +07:00
2ca0bcc1c1 feat(depth): observed_volume depth clearing as deployed 2026-10-14
Baseline commit of the working-tree refactor built on 2026-10-14 17:24 and
running on the KIT robot, recorded in one commit before further changes.

- VoxelLayer clearing looks up TF at the depth image stamp.
- ObservationBuffer: per-source cloud preparation at the measurement stamp,
  height/range gate before the PCL VoxelGrid.
- DepthFramePairer: pairs the marking cloud with the clearing image by
  source and stamp, bounded queue and age.
- DepthVisibilityChecker and the observed_volume clearing mode in VoxelLayer;
  the legacy frustum mode stays the default.
- Tests: depth_observation_buffer_test, depth_visibility_test.
2026-10-15 11:37:56 +07:00