From f67f59f3835bfa28ccc11d70f0b2334449d0f2e2 Mon Sep 17 00:00:00 2001 From: arm_dev Date: Wed, 23 Sep 2026 14:52:32 +0800 Subject: [PATCH] =?UTF-8?q?handeye/calibrate.yaml=20=E7=B2=BE=E7=AE=80?= =?UTF-8?q?=E4=B8=BA=E7=BA=AF=E7=AE=97=E6=B3=95=E5=8F=82=E6=95=B0=EF=BC=8C?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E7=AB=99=E7=82=B9=E7=9B=B8=E5=85=B3=E5=89=AF?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原先这里各留了一份站点相关值的副本,与 poses/ 里的实际数据并不一致: calibrate.yaml 内嵌示教点 13 点,2026-08-28 poses/89_eye_in_hand.yaml 12 点,2026-09-02 只是恰好被覆盖顺序压住(run_handeye.sh 把 poses 文件作为后一个 --params-file,且用 -p 显式传 joint_prefix / output_dir / result_file), 所以当前行为是对的。但留着就是给"改了脚本顺序 / 直连节点"埋雷:会静默用上 旧数据集,而症状只是"标定结果变差",几乎不可能联想到这份副本。 这也是 SN 的又一处分散暴露面。 已移除 joint_prefix / output_dir / num_poses / waypoint_positions, 保留算法参数(mode、board_*、稳定判据、velocity_scale 等),并在原位写清 这四个值各自由谁提供。节点侧对它们本就有默认值,删掉不会报参数缺失; 但 waypoint_positions 的节点默认值是全 0,所以**直连节点是跑不了的**, 必须经 run_handeye.sh —— 这一点已在注释里说明。 验证:bash scripts/run_handeye.sh show 全部路径正常解析 (calibrate / poses / result / workdir 均正确,num_poses 读自 poses yaml) Co-authored-by: Cursor --- handeye/calibrate.yaml | 51 +++++++++++++++--------------------------- 1 file changed, 18 insertions(+), 33 deletions(-) diff --git a/handeye/calibrate.yaml b/handeye/calibrate.yaml index fa02c08..6303903 100644 --- a/handeye/calibrate.yaml +++ b/handeye/calibrate.yaml @@ -11,7 +11,21 @@ handeye_calibrate: ros__parameters: mode: "eye_in_hand" - joint_prefix: "Rizon4-063989_" + # ⚠️ 站点相关值**故意不写在这里**(joint_prefix / output_dir / num_poses / + # waypoint_positions),它们由 run_handeye.sh 在运行时提供: + # joint_prefix ← 由 arms.yaml 按臂号解析,-p 传入 + # output_dir ← 按"臂号 + 模式"算出的临时目录,-p 传入 + # num_poses / waypoint_positions ← 来自 handeye/poses/<臂号>_<模式>.yaml + # (作为后一个 --params-file,会覆盖本文件) + # 它们此前在这里各留了一份副本,与 poses/ 里的实际数据并不一致 + # (本文件是 2026-08-28 的 13 点,poses/89 是 2026-09-02 的 12 点), + # 只是恰好被覆盖顺序压住。留着就是给"改了脚本顺序 / 直连节点"埋雷: + # 会静默用上旧数据,而症状只是标定结果变差,很难联想到这份副本。 + # 注:waypoint_positions 的节点默认值是全 0,所以**直连节点是跑不了的**, + # 必须经 run_handeye.sh(或自己传 --params-file)—— 这是有意为之。 + # + # 设备ID 相关的东西同理,不写死在这里,见 config/site.yaml 与 arms.yaml。 + joint_names: [joint1, joint2, joint3, joint4, joint5, joint6, joint7] velocity_scale: 0.10 action_name: "follow_joint_trajectory" @@ -49,39 +63,10 @@ handeye_calibrate: # 临时产物(采点图、taught_poses.txt、captures.json)落在 handeye/tmp/ 下。 # 注意 handeye/tmp/ 不进 git。 - output_dir: "/home/cc/ros2/handeye/tmp" + # output_dir 不写在这里:由 run_handeye.sh 按"臂号 + 模式"算出击(handeye/tmp/89 等)。 + # 留一个共享的 output_dir 会让多条臂互相覆盖采点,症状是"标定结果突然变差"。 + # # 留空 = 由 run_handeye.sh 按"设备ID + 模式"给出路径, # 即 handeye/results/<臂号>_<模式>.yaml(如 89_eye_in_hand.yaml)。 result_file: "" cleanup_images: true - - num_poses: 13 - # Taught 2026-08-28 via handeye_teach (backend:=rdk) - waypoint_positions: [ - # pose 0 - -1.107107, -0.744489, 0.982447, 1.856279, -0.735517, 0.946910, -0.118163, - # pose 1 - -0.982764, -1.163516, 1.128527, 1.406787, -0.502416, 0.571857, 0.224024, - # pose 2 - -1.012149, -1.180698, 1.184095, 1.390763, -0.559587, 0.407246, 0.249883, - # pose 3 - -0.984199, -1.175286, 1.175012, 1.397197, -0.796608, 0.459682, 0.247304, - # pose 4 - -0.982355, -1.196864, 1.076502, 1.590187, -1.106339, 0.636800, 0.481410, - # pose 5 - -1.121428, -1.173892, 1.152070, 1.762215, -1.147604, 0.641314, 0.434178, - # pose 6 - -1.121716, -1.174258, 1.203286, 1.643879, -1.200144, 0.459669, 0.315685, - # pose 7 - -1.100360, -1.337467, 1.235742, 1.377341, -1.211692, 0.569701, 0.220985, - # pose 8 - -1.160070, -1.473164, 1.364572, 1.369112, -0.784077, 0.489467, 0.378945, - # pose 9 - -0.575560, -1.470411, 1.348577, 0.982228, -1.163608, -0.208091, 0.410659, - # pose 10 - -0.716065, -1.411332, 1.272539, 1.753754, -1.856130, -0.098214, 0.341287, - # pose 11 - -0.870910, -1.412227, 1.243149, 1.900543, -1.886769, 0.153908, -0.399394, - # pose 12 - -0.656925, -1.412314, 1.216671, 1.820324, -1.850224, -0.103640, -0.399964, - ]