f882c4309c
顶视迁臂改走厂家 MoveL,D405 框心对准后再对孔;夹爪停在 caught 时 open 不再把相同目标当成已经张开,init 会真的回零。 Co-authored-by: Cursor <cursoragent@cursor.com>
入孔检测权重
改这个目录之前先读
../README.md(权重模块的规则)。
用于"把孔当框来检测"的模型(hole_detect.backend: yolo)。
当前现场用的是 two_stage(两阶段)后端,它用的是工件权重
(hole_detect.workpiece_weights,指向 models/yolo/ 里的模型),
本目录的模型并不是每次都会用到。
现状
detect_best_1.onnx—— 被hole_detect.workpiece_weights使用(two_stage后端)。 这是本目录唯一在用的模型。
已修掉的悬空引用
config/site.yaml 的 paths.hole_weights 与 hole_detect.weights 原先都指向
不存在的文件 models/hole_insert/best.pt。backend: two_stage 时这两处不被读取,
所以一直没暴露;一旦切成 backend: yolo 就会启动失败。
现已改为实际存在的 detect_best_1.onnx。同一个悬空的 best.pt 还藏在代码里
(hole_detector.py 的 weights_from_site / _default_model_path,那里三个候选
路径全都不存在,函数却总会返回第一个),也一并修成了以 site.yaml 为准、
再退到实际存在的模型。
改权重相关路径后,用 bash ~/ros2/scripts/weights.sh doctor 复查悬空引用。
加新模型 / 看标签
和 models/yolo/ 完全一样,只是分组名换成 hole_insert:
bash ~/ros2/scripts/weights.sh convert staging/xxx.onnx --name hole_detect --group hole_insert
bash ~/ros2/scripts/weights.sh labels detect_best_1 --group hole_insert