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

cwsfa/following-transport-amr Private

[참조 MVP] 작업자 추종 이송 AMR — 작업자 목표와 적재·배터리 상태를 이송 플랫폼 명령으로 결합하는 참조 MVP입니다.

https://git.agrithing.ai/cwsfa/following-transport-amr.git
4 commits
2 items · feat/concrete-mvp-v2
·/ asw_component/component.py
python · 966 B · 5836fbc Download
from __future__ import annotationsdef execute(payload: dict) -> dict:    distance = float(payload.get("distanceM", 0))    target_distance = float(payload.get("targetDistanceM", 1.8))    reasons = []    if float(payload.get("payloadKg", 0)) > 120: reasons.append("PAYLOAD_LIMIT")    if float(payload.get("batteryPercent", 0)) < 20: reasons.append("LOW_BATTERY")    accepted = not reasons    close_stop = distance < 0.8    speed = 0.0 if not accepted or close_stop else min(float(payload.get("maxSpeedMps", 0.8)), max(0.0, (distance - target_distance) * 0.7))    command = "BLOCKED" if not accepted else ("SAFETY_STOP" if close_stop else ("HOLD" if speed == 0 else "FOLLOW"))    return {"component": "cwsfa/following-transport-amr", "accepted": accepted,            "status": command, "target": "acu", "workerTrackId": str(payload.get("workerTrackId", "unknown")),            "speedMps": round(speed, 3), "command": command, "blockingReasons": reasons}