换台电脑克隆后启动失败,是因为 site 和启动脚本写死了 /home/cc/ros2。仓库内路径改成相对仓库根,加载时再展开;缺 install 时先说明要编译,而不是 source 一个不存在的文件。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
arm_dev
2026-10-15 10:51:24 +08:00
parent ab73399426
commit 3c86441fb0
25 changed files with 254 additions and 91 deletions
+20 -20
View File
@@ -45,11 +45,11 @@ robot:
# (status 里的 init=need_init 只说明"绝对位置标定没做",不影响夹持)
# 想让开机必初始化(无人值守的上电流程)就显式改 true,并确认爪里是空的。
auto_init: false
named_poses_file: "/home/cc/ros2/src/arm_control/config/named_poses_89.yaml"
named_poses_file: "src/arm_control/config/named_poses_89.yaml"
paths:
handeye_file: "/home/cc/ros2/handeye/results/89_eye_in_hand.yaml"
handeye_waypoints: "/home/cc/ros2/handeye/poses/89_eye_in_hand.yaml"
handeye_workdir: "/home/cc/ros2/handeye/tmp/89"
handeye_file: "handeye/results/89_eye_in_hand.yaml"
handeye_waypoints: "handeye/poses/89_eye_in_hand.yaml"
handeye_workdir: "handeye/tmp/89"
handeye:
# Studio tcp_location(法兰系,米 + qwxyz)。与 rdk Tool.params 必须一致。
# 眼在手上:AX=XB 的手是这份 TCP,再折成 cam→法兰写 T_4x4。
@@ -195,7 +195,7 @@ robot:
# 为什么必须给文件而不能留空:visual_servo 的 servo_node 需要
# T_flange_cam 矩阵做像素→笛卡尔换算;留空它就直接拒绝启动
#("手眼标定结果缺失"),S04 跟踪起不来。
handeye_file: "/home/cc/ros2/handeye/results/sim_eye_in_hand.yaml"
handeye_file: "handeye/results/sim_eye_in_hand.yaml"
# 运动参数:**大部分**与 89 共用(锚点),但**高度类**必须按仿真台的几何改写。
#
# 为什么不能直接共用:真机是"机械臂装在台面同一高度",所以"法兰相对基座"
@@ -289,11 +289,11 @@ robot:
port: "/dev/ttyUSB1"
stroke_mm: 30.0
auto_init: false
named_poses_file: "/home/cc/ros2/src/arm_control/config/named_poses_91.yaml"
named_poses_file: "src/arm_control/config/named_poses_91.yaml"
paths:
handeye_file: "/home/cc/ros2/handeye/results/91_eye_in_hand.yaml"
handeye_waypoints: "/home/cc/ros2/handeye/poses/91_eye_in_hand.yaml"
handeye_workdir: "/home/cc/ros2/handeye/tmp/91"
handeye_file: "handeye/results/91_eye_in_hand.yaml"
handeye_waypoints: "handeye/poses/91_eye_in_hand.yaml"
handeye_workdir: "handeye/tmp/91"
# >>> 右臂跟踪高度:只改这里,89 仍用上面那段 <<<
# 法兰 Z;RGI 比平行爪高,通常要比 89 略抬一点。改完重启:
# bash ~/ros2/scripts/run_visual_servo_rt.sh --arm 91 --control
@@ -314,7 +314,7 @@ robot:
paths:
# >>> YOLO 权重(标准放法,不必改代码)<<<
# 1) 把 .onnx / .pt 放到 /home/cc/ros2/models/yolo/
# 1) 把 .onnx / .pt 放到 models/yolo/
# 2) 这一行改成那个绝对路径(写 .onnx 即可;TensorRT 会找同名 .engine)
# 3) backend=tensorrt 时必须先导出引擎(只需做一次):
# bash ~/ros2/scripts/weights.sh convert <源文件> --name <名字> --group yolo
@@ -328,18 +328,18 @@ paths:
# ultralytics 解不了 pose 的 TensorRT engine,运行时走
# arm_application/pose_detector.py 的自解码(见该模块头)。
# 仍然用 .engine(实测 ~2.6 ms/帧;onnx 只有 CPU provider,约 27 ms)。
yolo_weights: "/home/cc/ros2/models/yolo/gongjian0929.onnx"
yolo_weights: "models/yolo/gongjian0929.onnx"
# 换模型:把 models/yolo/ 下别的 .onnx / .pt 绝对路径填进来即可。
# 未在用的模型已移出仓库(体积大且干扰 `weights.sh list`),要恢复见 models/README.md。
# 入孔模型(backend=yolo 时把孔当框)。two_stage 用下面的工件权重。
# pose 模型两处共用同一份 —— 它既能框工件,又直接给 k1/k2 关键点。
# 查悬空引用:bash ~/ros2/scripts/weights.sh doctor
hole_weights: "/home/cc/ros2/models/yolo/gongjian0929.onnx"
hole_weights: "models/yolo/gongjian0929.onnx"
# 下面是缺省(未匹配到 robots[] 时)。真机以 robots[].paths 为准:89 / 91 各一份。
handeye_file: "/home/cc/ros2/handeye/results/89_eye_in_hand.yaml"
handeye_waypoints: "/home/cc/ros2/handeye/poses/89_eye_in_hand.yaml"
handeye_calibrate: "/home/cc/ros2/handeye/calibrate.yaml"
handeye_workdir: "/home/cc/ros2/handeye/tmp/89"
handeye_file: "handeye/results/89_eye_in_hand.yaml"
handeye_waypoints: "handeye/poses/89_eye_in_hand.yaml"
handeye_calibrate: "handeye/calibrate.yaml"
handeye_workdir: "handeye/tmp/89"
# 空=默认 DDS(SHM);勿强制 UDP-only,否则相机预览收不到 /workpiece/detection
fastdds_profile: ""
@@ -663,10 +663,10 @@ gripper:
hole_detect:
backend: "two_stage" # two_stage | yolo | hough
# backend=yolo 时用。
weights: "/home/cc/ros2/models/yolo/gongjian0929.onnx"
weights: "models/yolo/gongjian0929.onnx"
# 二阶段工件检测权重。pose 模型既框工件、又直接给 k1/k2 关键点,
# 所以和上面的跟踪权重是同一份。
workpiece_weights: "/home/cc/ros2/models/yolo/gongjian0929.onnx"
workpiece_weights: "models/yolo/gongjian0929.onnx"
# pose 关键点优先:检测器给了 k1/k2 就直接用,不用再找圆。
# 关键点不可信(低于 keypoint_min_conf / 两点几乎重合)时自动回落到
# 亮环 + Hough 那套老路径。
@@ -674,7 +674,7 @@ hole_detect:
keypoint_min_conf: 0.30
keypoint_min_dist_px: 15.0
keypoint_hole_radius_px: 12.0 # 关键点没有半径;反投影时按这个半径取孔周深度环
config: "/home/cc/ros2/src/arm_application/config/hole_detect.yaml"
config: "src/arm_application/config/hole_detect.yaml"
conf: 0.25
iou: 0.7
imgsz: 640
@@ -1085,7 +1085,7 @@ tactile:
# 传感器型号。必须与 devices/sensors/orisys/models/ 下的子目录名一致。
model: "dd03"
# 型号配置随 SDK 一起放:devices/sensors/orisys/models/<型号>/config.json
config_file: "/home/cc/ros2/devices/sensors/orisys/models/dd03/config.json"
config_file: "devices/sensors/orisys/models/dd03/config.json"
# 用 by-path 稳定路径(插哪个 USB 口就认哪个口,不受 video 编号漂移影响)。
# 当前:3.4.1=左指 3.4.2=右指;若左右反了,互换两行即可。
left_video: "/dev/v4l/by-path/pci-0000:00:14.0-usb-0:3.4.1:1.0-video-index0"