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

hada/greenhouse-transport-platform Private

[참조 MVP] 온실 이송 플랫폼 고도화 — 이송 플랫폼의 주행·적재·현장 실증 상태를 제공하는 위탁연구 참조 MVP입니다.

https://git.agrithing.ai/hada/greenhouse-transport-platform.git
4 commits
COMMIT DETAIL

feat: 온실 이송 플랫폼 고도화 구체 MVP 구현

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

hada-dev <[email protected]> · 2026. 8. 3. 오후 3:13:15
314c1dff3930c08fdec0bccf8e0281a6a4817089
8 changed files +68 −8 parent 4315384
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 +14−3 View file
@@ -2,6 +2,17 @@ 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": "hada/greenhouse-transport-platform", "accepted": True, "status": "READY", "target": "mcu", "input_fields": sorted(payload.keys())}
5 + maximum = float(payload.get("maximumPayloadKg", 120))
6 + payload_kg = float(payload.get("payloadKg", 0))
7 + reasons = []
8 + if not payload.get("driveReady"): reasons.append("DRIVE_NOT_READY")
9 + if payload.get("fieldMode") != "GREENHOUSE": reasons.append("INVALID_FIELD_MODE")
10 + if payload.get("emergencyStop"): reasons.append("EMERGENCY_STOP")
11 + if maximum <= 0 or payload_kg > maximum: reasons.append("PAYLOAD_LIMIT")
12 + ratio = payload_kg / maximum if maximum > 0 else 1.0
13 + accepted = not reasons
14 + speed = 0.0 if not accepted else max(0.25, round(0.8 * (1 - 0.45 * min(ratio, 1)), 3))
15 + return {"component": "hada/greenhouse-transport-platform", "accepted": accepted,
16 + "status": "PLATFORM_READY" if accepted else "BLOCKED", "target": "mcu",
17 + "platformId": str(payload.get("platformId", "unknown")), "command": "ENABLE_DRIVE" if accepted else "STOP",
18 + "speedLimitMps": speed, "loadRatio": round(ratio, 3), "blockingReasons": reasons}
modified contracts/component.interface.json +22−1 View file
@@ -5,7 +5,13 @@
5 5 "required": [
6 6 "component",
7 7 "accepted",
8 "status"
8 + "status",
9 + "target",
10 + "platformId",
11 + "command",
12 + "speedLimitMps",
13 + "loadRatio",
14 + "blockingReasons"
9 15 ],
10 16 "properties": {
11 17 "component": {
@@ -19,6 +25,21 @@
19 25 },
20 26 "target": {
21 27 "const": "mcu"
28 + },
29 + "platformId": {
30 + "type": "string"
31 + },
32 + "command": {
33 + "type": "string"
34 + },
35 + "speedLimitMps": {
36 + "type": "number"
37 + },
38 + "loadRatio": {
39 + "type": "number"
40 + },
41 + "blockingReasons": {
42 + "type": "array"
22 43 }
23 44 }
24 45 }
added examples/failure-input.json +8−0 View file
@@ -0,0 +1,8 @@
1 + {
2 + "platformId": "carrier-01",
3 + "driveReady": true,
4 + "payloadKg": 86,
5 + "maximumPayloadKg": 120,
6 + "fieldMode": "GREENHOUSE",
7 + "emergencyStop": true
8 + }
modified examples/input.json +3−1 View file
@@ -2,5 +2,7 @@
2 2 "platformId": "carrier-01",
3 3 "driveReady": true,
4 4 "payloadKg": 86,
5 "fieldMode": "GREENHOUSE"
5 + "maximumPayloadKg": 120,
6 + "fieldMode": "GREENHOUSE",
7 + "emergencyStop": false
6 8 }
modified pyproject.toml +1−1 View file
@@ -1,5 +1,5 @@
1 1 [project]
2 2 name = "greenhouse-transport-platform"
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": "Field Platform",
9 9 "status": "REFERENCE_MVP",
10 10 "compatibility": {
modified tests/test_component.py +12−0 View file
@@ -12,6 +12,18 @@ class ComponentTest(unittest.TestCase):
12 12 result = execute(payload)
13 13 self.assertTrue(result["accepted"])
14 14 self.assertEqual(result["component"], "hada/greenhouse-transport-platform")
15 + self.assertEqual(result["target"], "mcu")
16 + self.assertEqual(result["command"], "ENABLE_DRIVE")
17 + self.assertEqual(result["loadRatio"], 0.717)
18 + self.assertGreater(result["speedLimitMps"], 0.5)
19 +
20 + def test_safety_or_failure_path(self):
21 + payload = json.loads((ROOT / "examples/failure-input.json").read_text(encoding="utf-8"))
22 + result = execute(payload)
23 + self.assertEqual(result["component"], "hada/greenhouse-transport-platform")
24 + self.assertFalse(result["accepted"])
25 + self.assertEqual(result["command"], "STOP")
26 + self.assertIn("EMERGENCY_STOP", result["blockingReasons"])
15 27
16 28 if __name__ == "__main__":
17 29 unittest.main()