105 lines
2.5 KiB
YAML
105 lines
2.5 KiB
YAML
# SopHelper 示例配方 —— 区域坐标必须按现场画面重新标定,别照抄
|
||
#
|
||
# 这份配方只用引擎确实实现的方法(见 SopHelper.Engine/Sop/ConditionMethod.cs):
|
||
# time_elapsed / hand_in_region / hand_move / object_in_zone / object_present
|
||
# 区域坐标是绝对像素(相机原始分辨率下的坐标),先接相机、截图、再标定。
|
||
|
||
sop:
|
||
name: 示例-取放流程
|
||
version: "1.0"
|
||
description: 演示最小闭环:手部就位 → 计时 → 取放搬运(不依赖检测模型)
|
||
|
||
settings:
|
||
confidence_threshold: 0.6
|
||
stable_frames: 3
|
||
position_tolerance: 30
|
||
enable_timeout_detection: true
|
||
auto_reset_on_complete: true
|
||
reset_delay_sec: 2
|
||
frame_stride: 2
|
||
|
||
# 只用手部 + 计时时可以不写 model;要用 object_* 类条件就必须写
|
||
# model:
|
||
# path: models/yolov8n.onnx
|
||
# input_size: 640
|
||
# classes:
|
||
# - cup
|
||
# - screw
|
||
|
||
regions:
|
||
table:
|
||
x1: 200
|
||
y1: 420
|
||
x2: 760
|
||
y2: 820
|
||
name: 桌面操作区
|
||
color: "#4CAF50"
|
||
tray:
|
||
x1: 60
|
||
y1: 120
|
||
x2: 400
|
||
y2: 380
|
||
name: 来料区
|
||
color: "#2196F3"
|
||
out:
|
||
x1: 900
|
||
y1: 150
|
||
x2: 1240
|
||
y2: 420
|
||
name: 成品区
|
||
color: "#FF9800"
|
||
|
||
steps:
|
||
- id: 1
|
||
name: 手放到桌面上方
|
||
description: 手进入桌面操作区即算就位
|
||
timeout: 30
|
||
standard_duration_ms: 3000
|
||
detection:
|
||
method: hand_in_region
|
||
region: table
|
||
hand: any
|
||
stable_frames: 3
|
||
violation_rules:
|
||
- type: timeout
|
||
description: 手迟迟没有放到操作位
|
||
severity: 1
|
||
|
||
- id: 2
|
||
name: 保持 2 秒
|
||
description: 纯计时,用来演示计时类条件
|
||
timeout: 0
|
||
detection:
|
||
method: time_elapsed
|
||
duration_ms: 2000
|
||
|
||
- id: 3
|
||
name: 从操作区拿到料区
|
||
description: 手从桌面操作区移到料区(轨迹证据来自上一帧)
|
||
timeout: 30
|
||
detection:
|
||
method: hand_move
|
||
from_region: table
|
||
to_region: tray
|
||
hand: any
|
||
tolerance: 30
|
||
violation_rules:
|
||
- type: timeout
|
||
description: 取料超时
|
||
severity: 1
|
||
|
||
- id: 4
|
||
name: 放入成品区
|
||
description: 手从料区移到成品区
|
||
timeout: 30
|
||
detection:
|
||
method: hand_move
|
||
from_region: tray
|
||
to_region: out
|
||
hand: any
|
||
tolerance: 30
|
||
violation_rules:
|
||
- type: timeout
|
||
description: 放入超时
|
||
severity: 1
|