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.
This commit is contained in:
@@ -109,6 +109,7 @@ add_library(robot_costmap_2d SHARED
|
||||
src/costmap_2d.cpp
|
||||
src/observation_buffer.cpp
|
||||
src/depth_visibility.cpp
|
||||
src/depth_evidence_store.cpp
|
||||
src/layer.cpp
|
||||
src/layered_costmap.cpp
|
||||
src/costmap_math.cpp
|
||||
@@ -297,6 +298,9 @@ if(BUILD_DEPTH_MARKING_TESTS)
|
||||
add_executable(depth_visibility_test test/depth_visibility_test.cpp)
|
||||
target_link_libraries(depth_visibility_test PRIVATE
|
||||
plugins robot_costmap_2d GTest::GTest GTest::Main)
|
||||
add_executable(depth_evidence_store_test test/depth_evidence_store_test.cpp)
|
||||
target_link_libraries(depth_evidence_store_test PRIVATE
|
||||
robot_costmap_2d GTest::GTest GTest::Main)
|
||||
endif()
|
||||
|
||||
if(BUILD_COSTMAP_TESTS)
|
||||
|
||||
Reference in New Issue
Block a user