mls_planner: cap the surface closing image at the max map span - #3643
mls_planner: cap the surface closing image at the max map span#3643jeff-hykin wants to merge 6 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## jeff/fix/ray_tracing_tf #3643 +/- ##
===========================================================
- Coverage 77.78% 77.76% -0.03%
===========================================================
Files 1293 1295 +2
Lines 123834 123930 +96
Branches 10851 10856 +5
===========================================================
+ Hits 96329 96370 +41
- Misses 24364 24417 +53
- Partials 3141 3143 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Greptile SummaryThis change adds a configurable maximum span for surface morphology so anomalous distant voxel coordinates do not trigger dense image allocation. Normal bounded surface slices continue to close small holes during both full-map and regional updates. Confidence Score: 5/5No blocking failure remains. The exercised far-outlier path preserved the source surface cells without closing across the oversized span, while bounded full-map and regional updates continued to close the intended hole.
What T-Rex did
Reviews (3): Last reviewed commit: "Merge remote-tracking branch 'origin/jef..." | Re-trigger Greptile |
|
Ah yes I see the bug now lol |
|
Would it be better to change the morphological functions to do local operations? The imageproc functions are probably not what we want now that I think of it for this exact reason. Instead we can just do the dilation/erosion on the occupied voxels without allocating the entire 2d slice as an image |
|
Oops didn't realized you commented. I found it was partially an issue on my end too; a bad TF put the camera far away so it instantiated a really large surface.
That sounds like a good optimization for me. |
6a6d57b to
a8fb2a3
Compare
a08dfd9 to
f1533d6
Compare
a8fb2a3 to
0e4a952
Compare
f1533d6 to
9c32093
Compare
close_at_z allocates a dense byte image spanning the min/max voxel index of the slice. voxelize saturates out-of-range coordinates to i32::MAX, so a single corrupt point asked for a ~2.1e9-wide image; three orphaned planners held 220 GB each after a replay. A slice wider than max_map_span_m is corrupt input rather than a big room, and closing only bridges a few cells anyway.
voxelize saturates a corrupt coordinate to i32::MAX, which is the case the span guard exists for, but the span itself was computed in i32 and overflowed before the guard could run. The test now drives both saturation ends.
The width alone does not say whether one stray point stretched the slice or the whole map was placed far from the origin, and the two have different causes upstream.
9c32093 to
1807f7e
Compare
A single corrupt point made
close_at_zallocate a ~2.1e9-wide byte image; three orphaned mls_planner processes held 220 GB each after a replay.voxelizeusesf32 as i32, which saturates out-of-range coordinates toi32::MAXclose_at_zsizes a denseGrayImagefrom the min/max voxel index of the slice, so that one point stretches it across the whole gapmax_map_span_mconfig (default 500.0); slices wider than it skip closing and pass through uncloseda_far_outlier_does_not_allocate_the_gap