d289168dd0
先回答"这些模型到底有没有人用",用全仓库引用扫描判定,不靠猜: 在用 yolo/detect_best_0.onnx + .engine ← paths.yolo_weights 在用 hole_insert/detect_best_1.onnx ← hole_detect.weights / workpiece_weights 零引用 detect_hc90(pt/onnx/engine) ← 只剩注释里的历史说明 零引用 detect_yolo26_gongjian.pt 零引用 detect_best(onnx/engine) ← 仅代码兜底候选,而那个候选是 .pt,不存在 所以 detect_hc90 不需要修复,是不用的东西:连同另两个一起移出仓库。 注意**二进制权重被 gitignore**,删掉就找不回来了,因此是移出到 ~/ros2-models-unused-20260923/ 而非 rm。搬回 models/ 即可被 list 重新发现。 顺手挖出并修掉三处悬空引用(和之前 site.yaml 里那个 best.pt 同一类问题): - hole_detector.weights_from_site:兜底路径写死 models/hole_insert/best.pt(不存在) - hole_detector._default_model_path:三个候选路径**全都不存在**,函数却 `return candidates[0]`,于是永远返回不存在的 best.pt;报错路径看着很合理, 极易被误判成"文件被误删"。现改为以 site.yaml 为准,再退到规范模型。 - config/hole_insert.yaml 顶部注释同样写的是 best.pt 新增 test_hole_detector.py(8 项)锁住这个回归。测试刻意**不断言文件存在** ——二进制不进 git,新克隆的仓库里 models/ 是空的——只断言解析结果指向规范模型名。 体检从 4 处问题降到 0:bash scripts/weights.sh doctor --check-engines → "没有发现问题" 测试 233 项通过;18 个包构建通过。 Co-authored-by: Cursor <cursoragent@cursor.com>
arm_application
现场业务包。操作员用 ~/ros2/scripts/*.sh,不要直接改这里的默认 yaml。
节点(console_scripts)
| 可执行文件 | 源文件 | 作用 |
|---|---|---|
realsense_color_pub |
realsense_color_pub.py |
D405 发布 + 预览 |
perception_node |
perception_node.py |
YOLO + 平面中心 → 点 |
servo_node |
servo_node.py |
100 Hz hover / 锁高 |
handeye_teach |
handeye_teach.py |
拖拽记点 |
handeye_calibrate |
handeye_calibrate.py |
走点 + 解 T |
handeye_waypoints |
handeye_waypoints.py |
旧巡航记点(可选) |
dh_pgea / dh_pgea_cli |
dh_pgea_node.py / dh_pgea.py |
左臂 PGEA |
dual_gripper / dual_gripper_cli |
dual_gripper_node.py / dual_gripper_cli.py |
PGEA+RGI |
hole_detect |
hole_detect_node.py |
入孔检测 |
tactile / tactile_cli |
tactile_node.py / tactile_cli.py |
Orisys 视触觉 |
goto_ee_plane |
goto_ee_plane.py |
可选:抬高再回 home(默认启动不再调用) |
demo_named_poses |
demo_named_poses.py |
mock/实机点位示例 |
run_joint_trajectory |
run_joint_trajectory.py |
轨迹回放 |
库模块见包内 __init__.py。接口总表:docs/INTERFACES.md。
配置
| 文件 | 角色 |
|---|---|
config/perception.yaml servo.yaml |
默认值,被 site.yaml 覆盖 |
config/hole_detect.yaml |
two_stage 缺省;被 site.yaml hole_detect 覆盖 |
config/hole_insert.yaml |
yolo/hough 缺省 |
config/orisys/dd03.json |
已迁走:型号配置随 SDK 放在 devices/sensors/orisys/models/dd03/config.json,路径写在 site.yaml tactile.config_file |
config/handeye_result_89.yaml / _91.yaml |
该臂手眼 T(标定写入;禁止混用) |
config/handeye_poses_89.yaml / _91.yaml |
该臂示教关节 |
launch/visual_servo.launch.py |
感知 + 伺服 + 手眼 TF |
launch/dh_pgea.launch.py |
左臂 PGEA |
launch/dual_gripper.launch.py |
双爪 |
launch/hole_detect.launch.py |
入孔检测 |
launch/tactile.launch.py |
视触觉 |