fix(lab): stabilize recorded spatial playback

This commit is contained in:
DCCONSTRUCTIONS
2026-08-06 08:51:10 +03:00
parent 9df9f58ab8
commit e38f2fb1da
11 changed files with 316 additions and 99 deletions
+11 -1
View File
@@ -276,6 +276,13 @@ class RecordedGeometryStore:
points.setflags(write=False)
return points
@property
def maximum_current_point_count(self) -> int:
"""Return the immutable source-pack upper bound for one recorded increment."""
counts = np.diff(np.asarray(self._source["cloud_offsets"], dtype=np.int64))
return int(counts.max(initial=0))
def pose_values_for_frame(
self,
frame_id: str,
@@ -946,7 +953,10 @@ def _camera_unavailable_observation(
)
def _load_npz(path: Path, label: str) -> dict[str, npt.NDArray[np.generic]]:
def _load_npz(
path: Path,
label: str,
) -> dict[str, npt.NDArray[np.generic]]:
try:
with np.load(path, allow_pickle=False) as archive:
return {name: np.asarray(archive[name]) for name in archive.files}