读取视觉定位数据
read_position_dataRetrieve object coordinates from the most recent vision scan. Optionally filter by color to target specific items for pick-and-place.
Instructions
读取外部视觉系统输出的物料定位文件,返回最新一次扫描检测到的物体。
文件格式: 时间戳(颜色:X;Y);(颜色:X;Y);...,一行可有多个物体,每次扫描追加一行。始终只返回最新时间戳的数据。
参数: color: 可选,过滤指定颜色 (如 "红色"/"蓝色"/"绿色"),不传则返回全部
返回每个物体的颜色、世界坐标 (X/Y mm)、检测时间戳。 典型用法 — 配合 move_to 完成抓取:
read_position_data() → 获取最新物料坐标
move_to(x=202, y=-19, z=50) → 移动到物料上方
move_relative(dz=-30) → 下降 → gripper_close → move_relative(dz=50) → 抓起
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |