Skip to content

Commit d593c30

Browse files
committed
fix: lower per-bin floor threshold to 20pts so sparse floor at 1m height still calibrates
1 parent b10281b commit d593c30

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • dimos/perception/stereo_point_cloud

dimos/perception/stereo_point_cloud/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ class _FloorCalibrator:
7878
FLOOR_MAX_Z = -0.30
7979
FLOOR_MIN_Z = -3.0
8080
FLOOR_MAX_DIST_M = 4.0
81-
FLOOR_MIN_PTS = 200
81+
FLOOR_MIN_PTS = 200 # min total points in mask to attempt calibration
82+
FLOOR_BIN_PTS = 20 # min points per bin to count as a significant surface
8283

8384
def __init__(self) -> None:
8485
self._frame = 0
@@ -105,7 +106,7 @@ def update(self, xyz_cam: np.ndarray) -> None:
105106
return
106107
bins = np.arange(lo, hi + self.BIN_M, self.BIN_M)
107108
counts, edges = np.histogram(z_floor, bins=bins)
108-
significant = np.where(counts >= self.FLOOR_MIN_PTS)[0]
109+
significant = np.where(counts >= self.FLOOR_BIN_PTS)[0]
109110
if not len(significant):
110111
return
111112
self._samples.append(float(edges[significant[0]] + self.BIN_M / 2))

0 commit comments

Comments
 (0)