perf(perception): bound low-step component fanout
This commit is contained in:
@@ -106,13 +106,19 @@ def test_wide_operator_region_cannot_bridge_two_spatial_components() -> None:
|
||||
points = np.asarray(
|
||||
(
|
||||
(0.00, 0.0, 5.00),
|
||||
(0.10, 0.0, 5.05),
|
||||
(0.02, 0.0, 5.00),
|
||||
(0.04, 0.0, 5.00),
|
||||
(0.06, 0.0, 5.00),
|
||||
(0.08, 0.0, 5.00),
|
||||
(1.70, 0.0, 5.00),
|
||||
(1.80, 0.0, 5.05),
|
||||
(1.72, 0.0, 5.00),
|
||||
(1.74, 0.0, 5.00),
|
||||
(1.76, 0.0, 5.00),
|
||||
(1.78, 0.0, 5.00),
|
||||
),
|
||||
dtype=np.float64,
|
||||
)
|
||||
store = _Store(_frame(points), np.ones(4, dtype=np.uint8))
|
||||
store = _Store(_frame(points), np.ones(10, dtype=np.uint8))
|
||||
provider = M48AdditiveLowStepGeometryProvider( # type: ignore[arg-type]
|
||||
store=store,
|
||||
profile=load_m48_low_step_occupancy_profile(PROFILE_PATH),
|
||||
@@ -126,12 +132,15 @@ def test_wide_operator_region_cannot_bridge_two_spatial_components() -> None:
|
||||
)
|
||||
|
||||
assert len(additive) == 2
|
||||
assert {item.source_point_ids for item in additive} == {(0, 1), (2, 3)}
|
||||
assert {item.source_point_ids for item in additive} == {
|
||||
(0, 1, 2, 3, 4),
|
||||
(5, 6, 7, 8, 9),
|
||||
}
|
||||
assert all(item.semantic_hint is None for item in additive)
|
||||
assert all("occupied-only-never-free" in item.reason_codes for item in additive)
|
||||
snapshot = provider.snapshot()
|
||||
assert snapshot.additive_observation_count == 2
|
||||
assert snapshot.additive_voxel_count == 3
|
||||
assert snapshot.additive_voxel_count == 2
|
||||
assert snapshot.failed_frames == 0
|
||||
|
||||
|
||||
@@ -141,9 +150,12 @@ def test_frame_1856_preserves_baseline_posts_and_splits_low_hemisphere_support()
|
||||
store=store,
|
||||
profile=load_m48_low_step_occupancy_profile(PROFILE_PATH),
|
||||
)
|
||||
frame = store.frame_for_index(1856)
|
||||
# Operator-anchor sequences are one-based display frame numbers, while the
|
||||
# recorded-source packet and timeline use zero-based source sequences.
|
||||
source_sequence = 1856 - 1
|
||||
frame = store.frame_for_index(source_sequence)
|
||||
assert frame is not None
|
||||
observations = provider.associate(_packet(1856), ())
|
||||
observations = provider.associate(_packet(source_sequence), ())
|
||||
projected = project_map_points_kb4(
|
||||
frame.points_map,
|
||||
position_map_xyz=frame.sensor_position_map,
|
||||
|
||||
Reference in New Issue
Block a user