数据订阅

订阅 topic

wuji sub <topic> 订阅设备实时数据。默认持续订阅直到 Ctrl+C,加 --count N 收满 N 帧后自动退出:

wuji sub emf_poses --count 1             # 收 1 帧后退出
wuji sub tactile --count 10 --sn <SN>    # 指定设备收 10 帧
wuji sub imu_data/palm --count 1 --jsonl # 每帧一行紧凑 JSON

可订阅的 topic 用 wuji resources 查看,完整清单以命令输出为准。常用 topic 速查:

Topic说明
tactile触觉矩阵
emf_posesEMF 姿态
imu_data/palmIMU 数据
tip_poses指尖位姿
hand_joint_angles关节角
hand_skeleton手部骨架
tf坐标变换

采集数据到文件

--jsonl 每帧输出一行紧凑 JSON,配合管道即可轻量录制:

wuji sub tactile --count 500 --jsonl > tactile.jsonl          # 静默录制
wuji sub emf_poses --count 500 --jsonl | tee emf.jsonl | jq   # 边录边看

退出码为 0 表示按预期收满帧数,非 0 表示订阅失败,可用于脚本判定。