A-SW Hub / Repositories
Local Gitea · READ ONLY
← 저장소 Repositories
REPOSITORY

nas/thinning-end-effector Private

[참조 MVP] 적과 엔드이펙터 제어 — 과실 후보에 대한 접근·분리·회수 시퀀스를 표현하는 참조 MVP입니다.

https://git.agrithing.ai/nas/thinning-end-effector.git
4 commits
COMMIT DETAIL

feat: 적과 엔드이펙터 제어 구체 MVP 구현

기관 승인 및 자동 품질검사를 통과한 구체 MVP 0.2.0 병합 Co-authored-by: nas-dev <[email protected]>

nas-dev <[email protected]> · 2026. 8. 3. 오후 3:12:43
9073ccad4b173729c9b1072c4c890fe686942bbd
7 changed files +54 −7 parent 61be75a
modified README.md +7−1 View file
@@ -11,6 +11,12 @@
11 11
12 12 과실 후보에 대한 접근·분리·회수 시퀀스를 표현하는 참조 MVP입니다.
13 13
14 + ## MVP 동작 범위
15 +
16 + - 적과 안전상태 인터록
17 + - 작업력 한계 검사
18 + - 과실 분리·회수 시퀀스 생성
19 +
14 20 ## 실행
15 21
16 22 ```bash
@@ -18,4 +24,4 @@ python run.py examples/input.json
18 24 python -m unittest discover -s tests -v
19 25 ```
20 26
21 실제 기관 구현은 `contracts/component.interface.json`의 저장소 식별자와 제품 기준선 연결 규칙을 유지하면서 교체할 수 있습니다.
27 + 정상 입력은 `examples/input.json`, 차단·안전 경로는 `examples/failure-input.json`으로 재현합니다. 실제 기관 구현은 `contracts/component.interface.json`의 저장소 식별자와 제품 기준선 연결 규칙을 유지하면서 교체할 수 있습니다.
modified asw_component/component.py +11−3 View file
@@ -2,6 +2,14 @@ from __future__ import annotations
2 2
3 3
4 4 def execute(payload: dict) -> dict:
5 if not isinstance(payload, dict) or not payload:
6 raise ValueError("a non-empty object is required")
7 return {"component": "nas/thinning-end-effector", "accepted": True, "status": "READY", "target": "mcu", "input_fields": sorted(payload.keys())}
5 + reasons = []
6 + force = float(payload.get("forceLimitN", 0))
7 + if payload.get("operation") != "thinning": reasons.append("UNSUPPORTED_OPERATION")
8 + if payload.get("safetyState") != "READY": reasons.append("SAFETY_NOT_READY")
9 + if not 1 <= force <= 25: reasons.append("FORCE_LIMIT_OUT_OF_RANGE")
10 + accepted = not reasons
11 + sequence = ["APPROACH", "GRIP", "TWIST", "RETRACT", "RELEASE"] if accepted else []
12 + return {"component": "nas/thinning-end-effector", "accepted": accepted,
13 + "status": "SEQUENCE_READY" if accepted else "BLOCKED", "target": "mcu",
14 + "targetId": str(payload.get("targetId", "unknown")), "sequence": sequence,
15 + "interlocks": reasons, "estimatedCycleMs": 3400 if accepted else 0}
modified contracts/component.interface.json +18−1 View file
@@ -5,7 +5,12 @@
5 5 "required": [
6 6 "component",
7 7 "accepted",
8 "status"
8 + "status",
9 + "target",
10 + "targetId",
11 + "sequence",
12 + "interlocks",
13 + "estimatedCycleMs"
9 14 ],
10 15 "properties": {
11 16 "component": {
@@ -19,6 +24,18 @@
19 24 },
20 25 "target": {
21 26 "const": "mcu"
27 + },
28 + "targetId": {
29 + "type": "string"
30 + },
31 + "sequence": {
32 + "type": "array"
33 + },
34 + "interlocks": {
35 + "type": "array"
36 + },
37 + "estimatedCycleMs": {
38 + "type": "integer"
22 39 }
23 40 }
24 41 }
added examples/failure-input.json +6−0 View file
@@ -0,0 +1,6 @@
1 + {
2 + "operation": "thinning",
3 + "targetId": "fruit-17",
4 + "safetyState": "READY",
5 + "forceLimitN": 31
6 + }
modified pyproject.toml +1−1 View file
@@ -1,5 +1,5 @@
1 1 [project]
2 2 name = "thinning-end-effector"
3 version = "0.1.0"
3 + version = "0.2.0"
4 4 description = "과실 후보에 대한 접근·분리·회수 시퀀스를 표현하는 참조 MVP입니다."
5 5 requires-python = ">=3.11"
modified release/manifest.json +1−1 View file
@@ -4,7 +4,7 @@
4 4 "displayName": "적과 엔드이펙터 제어",
5 5 "owner": "국립농업과학원",
6 6 "implementationAuthor": "주식회사 비아 (연동 검증용 참조 구현)",
7 "version": "0.1.0-mvp",
7 + "version": "0.2.0-mvp",
8 8 "domain": "End Effector",
9 9 "status": "REFERENCE_MVP",
10 10 "compatibility": {
modified tests/test_component.py +10−0 View file
@@ -12,6 +12,16 @@ class ComponentTest(unittest.TestCase):
12 12 result = execute(payload)
13 13 self.assertTrue(result["accepted"])
14 14 self.assertEqual(result["component"], "nas/thinning-end-effector")
15 + self.assertEqual(result["target"], "mcu")
16 + self.assertEqual(result["sequence"][2], "TWIST")
17 + self.assertEqual(result["estimatedCycleMs"], 3400)
18 +
19 + def test_safety_or_failure_path(self):
20 + payload = json.loads((ROOT / "examples/failure-input.json").read_text(encoding="utf-8"))
21 + result = execute(payload)
22 + self.assertEqual(result["component"], "nas/thinning-end-effector")
23 + self.assertFalse(result["accepted"])
24 + self.assertIn("FORCE_LIMIT_OUT_OF_RANGE", result["interlocks"])
15 25
16 26 if __name__ == "__main__":
17 27 unittest.main()