REPOSITORY
jbnu/3d-environment-perception Private
[참조 MVP] 3D 주행환경 인지 A-SW — 3차원 점군을 격자 군집화해 장애물 위치와 경계 상자를 생성합니다.
https://git.agrithing.ai/jbnu/3d-environment-perception.git 456d174 feat: 인지 신뢰도 감사 필드 제안
7b37d22 feat: adopt python VPU SDV reference implementation
8b9d3f5 feat: adopt python VPU SDV reference implementation
2d2177a ci: add language-specific static and dynamic analysis
914852b docs: define component scope and interface contract
15d0349 ci: verify contract tests and evidence package
d73e993 feat: add executable reference MVP
402fbd3 docs: define component scope and interface contract
2 items · feature/perception-confidence-audit
·/ asw_component/component.py
python · 819 B · f0071d0 Download
from __future__ import annotationsfrom collections import defaultdictdef execute(payload: dict) -> dict: cell = float(payload.get("cell_size_m", 1)) minimum = int(payload.get("min_points", 2)) if cell <= 0: raise ValueError("cell_size_m must be positive") buckets = defaultdict(list) for point in payload.get("points", []): buckets[(int(point[0] // cell), int(point[1] // cell))].append(point) obstacles = [] for key, points in buckets.items(): if len(points) < minimum: continue obstacles.append({"cell": list(key), "centroid": [round(sum(p[i] for p in points)/len(points), 3) for i in range(3)], "point_count": len(points), "class": "unknown_obstacle"}) return {"frame": "lidar", "obstacles": obstacles, "obstacle_count": len(obstacles)}