feat: implement 3D AABB overlap check for ICP registration
This commit is contained in:
@@ -1,20 +1,17 @@
|
||||
## 2026-02-10T09:45:00Z Session bootstrap
|
||||
- Initial notepad created for full-icp-pipeline execution.
|
||||
- Baseline code references verified in `aruco/icp_registration.py` and `refine_ground_plane.py`.
|
||||
- Corrected success gate logic to `> 0`.
|
||||
- Added INFO logging for all attempted ICP pairs.
|
||||
- Ensured all pairs are stored in `metrics.per_pair_results`.
|
||||
- Fixed overlap skip logging to use DEBUG level.
|
||||
- Fixed syntax and indentation errors in `aruco/icp_registration.py` that were causing unreachable code and malformed control flow.
|
||||
- Relaxed success gate to `metrics.num_cameras_optimized > 0`, allowing single-camera optimizations to be considered successful.
|
||||
- Implemented comprehensive per-pair diagnostic logging: INFO for ICP results (fitness, RMSE, convergence) and DEBUG for overlap skips.
|
||||
- Ensured all attempted ICP results are stored in `metrics.per_pair_results` for better downstream diagnostics.
|
||||
- Updated `tests/test_icp_registration.py` to reflect the new success gate logic.
|
||||
|
||||
## Task 2: Point Extraction Functions
|
||||
|
||||
### Learnings
|
||||
- Open3D's `remove_statistical_outlier` returns a tuple `(pcd, ind)`, where `ind` is the list of indices. We only need the point cloud.
|
||||
- `estimate_normals` with `KDTreeSearchParamHybrid` is robust for mixed geometry (floor + walls).
|
||||
- Hybrid extraction strategy:
|
||||
1. Extract floor band (spatial filter).
|
||||
2. Extract vertical points (normal-based filter: `abs(normal · floor_normal) < 0.3`).
|
||||
3. Combine using boolean masks on the original point set to avoid duplicates.
|
||||
- `extract_scene_points` provides a unified interface for different registration strategies (floor-only vs full-scene).
|
||||
|
||||
### Decisions
|
||||
- Kept `extract_near_floor_band` as a standalone function for backward compatibility and as a helper for `extract_scene_points`.
|
||||
- Used `mode='floor'` as default to match existing behavior.
|
||||
- Implemented `preprocess_point_cloud` to encapsulate downsampling and SOR, making the pipeline cleaner.
|
||||
- Added `region` field to `ICPConfig` to control the extraction mode in future tasks.
|
||||
## Task 3: 3D AABB Overlap Check
|
||||
- Implemented `compute_overlap_3d` in `aruco/icp_registration.py`.
|
||||
- Added `overlap_mode` to `ICPConfig` (defaulting to "xz").
|
||||
- Verified 3D overlap logic with new tests in `tests/test_icp_registration.py`.
|
||||
- Confirmed that empty inputs return 0.0 volume.
|
||||
- Confirmed that disjoint boxes return 0.0 volume.
|
||||
- Confirmed that partial and full overlaps return correct hand-calculable volumes.
|
||||
|
||||
Reference in New Issue
Block a user