feat(perception): qualify lidar evidence before models
This commit is contained in:
@@ -92,6 +92,11 @@ from k1link.compute.inline_temporal import (
|
||||
read_inline_profile,
|
||||
stabilize_world_state,
|
||||
)
|
||||
from k1link.compute.lidar_contract import (
|
||||
K1_LIVE_LIDAR_PROFILE,
|
||||
LidarQualityMonitor,
|
||||
lidar_readiness_document,
|
||||
)
|
||||
from k1link.compute.live_perception import (
|
||||
LIVE_RESULT_MAX_PAYLOAD_BYTES,
|
||||
LiveSensorSynchronizer,
|
||||
@@ -563,6 +568,7 @@ def _receiver(
|
||||
max_duration_seconds: float,
|
||||
decoder: PersistentFmp4Decoder,
|
||||
synchronizer: LiveSensorSynchronizer,
|
||||
lidar_quality: LidarQualityMonitor,
|
||||
state: _TransportState,
|
||||
sensor_decode_ms: dict[str, list[float]],
|
||||
result_queue: queue.Queue[bytes],
|
||||
@@ -690,6 +696,7 @@ def _receiver(
|
||||
)
|
||||
sensor_decode_ms[modality].append((time.perf_counter() - decode_started) * 1000)
|
||||
if modality == "lidar" and isinstance(normalized, DecodedPointCloudView):
|
||||
lidar_quality.observe(normalized)
|
||||
synchronizer.publish_point_cloud(normalized)
|
||||
elif modality == "pose" and isinstance(normalized, DecodedPoseView):
|
||||
synchronizer.publish_pose(normalized)
|
||||
@@ -919,6 +926,7 @@ def run(args: argparse.Namespace, loaded: _LoadedModels | None = None) -> int:
|
||||
capacity_per_modality=int(temporal["buffer_capacity_per_modality"]),
|
||||
retention_seconds=float(temporal["retention_seconds"]),
|
||||
)
|
||||
lidar_quality = LidarQualityMonitor(K1_LIVE_LIDAR_PROFILE)
|
||||
first_camera_epoch_ns: list[int] = []
|
||||
last_camera_epoch_ns: list[int] = []
|
||||
decoded_frame_count = 0
|
||||
@@ -1034,6 +1042,7 @@ def run(args: argparse.Namespace, loaded: _LoadedModels | None = None) -> int:
|
||||
"semantic": semantic_queue.snapshot,
|
||||
"decoder": decoder.snapshot,
|
||||
"synchronizer": synchronizer.snapshot,
|
||||
"lidar_quality": lidar_quality.snapshot,
|
||||
"result": lambda: {
|
||||
"capacity": result_queue.maxsize,
|
||||
"depth": result_queue.qsize(),
|
||||
@@ -1102,6 +1111,7 @@ def run(args: argparse.Namespace, loaded: _LoadedModels | None = None) -> int:
|
||||
"max_duration_seconds": args.max_duration_seconds,
|
||||
"decoder": decoder,
|
||||
"synchronizer": synchronizer,
|
||||
"lidar_quality": lidar_quality,
|
||||
"state": transport,
|
||||
"sensor_decode_ms": sensor_decode_ms,
|
||||
"result_queue": result_queue,
|
||||
@@ -1491,6 +1501,7 @@ def run(args: argparse.Namespace, loaded: _LoadedModels | None = None) -> int:
|
||||
"id": common["projection_manifest"]["pack_id"],
|
||||
"identity_sha256": common["projection_manifest"]["identity_sha256"],
|
||||
},
|
||||
"lidar_evidence": lidar_readiness_document(K1_LIVE_LIDAR_PROFILE),
|
||||
"worker_package": {
|
||||
"id": common["worker_package"]["package_id"],
|
||||
"identity_sha256": common["worker_package"]["identity_sha256"],
|
||||
@@ -1554,6 +1565,7 @@ def run(args: argparse.Namespace, loaded: _LoadedModels | None = None) -> int:
|
||||
"synchronizer": synchronizer.snapshot(),
|
||||
"sensor_decode_ms": sensor_decode_summary,
|
||||
},
|
||||
"lidar_quality": lidar_quality.snapshot(),
|
||||
"latency_ms": latency_summary,
|
||||
"temporal_stability": {
|
||||
"enabled": stability is not None,
|
||||
@@ -1602,6 +1614,8 @@ def run(args: argparse.Namespace, loaded: _LoadedModels | None = None) -> int:
|
||||
"limitations": [
|
||||
"Shadow diagnostic authority only; no commands or navigation output.",
|
||||
"Camera/LiDAR matching uses recorded host arrival time, not a hardware clock.",
|
||||
"K1 LiDAR is a vendor map increment, not an admitted raw sensor sweep.",
|
||||
"K1 LiDAR has no admitted per-point time, ring, scan geometry or IMU stream.",
|
||||
"Cross-host source epoch age is diagnostic and excluded from acceptance.",
|
||||
"COCO and Cityscapes models are not forest-domain or safety validated.",
|
||||
"Amodal cuboids infer unobserved volume from class priors.",
|
||||
|
||||
Reference in New Issue
Block a user