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

agerobotics/high-lift-mobile-platform Private

[참조 MVP] 고소작업 이동 플랫폼 — 주행·시저리프트·충전 상태를 단일 플랫폼 상태로 조정하는 참조 MVP입니다.

https://git.agrithing.ai/agerobotics/high-lift-mobile-platform.git
4 commits
2 items · feat/concrete-mvp-v2
·/ asw_component/component.py
python · 948 B · 954bf20 Download
from __future__ import annotationsdef execute(payload: dict) -> dict:    current, requested = float(payload.get("liftHeightM", 0)), float(payload.get("requestedHeightM", 0))    battery = float(payload.get("batteryPercent", 0))    delta = requested - current    reasons = []    if battery < 20: reasons.append("LOW_BATTERY")    if not 0.4 <= requested <= 2.4: reasons.append("HEIGHT_OUT_OF_RANGE")    if abs(delta) > 0.02 and payload.get("driveState") != "HOLD": reasons.append("DRIVE_NOT_HELD")    accepted = not reasons    command = "BLOCKED" if not accepted else ("HOLD" if abs(delta) <= 0.02 else ("LIFT" if delta > 0 else "LOWER"))    return {"component": "agerobotics/high-lift-mobile-platform", "accepted": accepted,            "status": "PLATFORM_READY" if accepted else "INTERLOCK", "target": "mcu",            "command": command, "deltaM": round(delta, 3), "blockingReasons": reasons,            "batteryPercent": battery}