接入 LinuxCNC TP 运行反馈
This commit is contained in:
@@ -173,7 +173,20 @@ LinuxCNC kinematics proof:
|
||||
promotionAllowed=true for kinematics frame source only
|
||||
```
|
||||
|
||||
这表示 Web 仿真已经具备 RTCP 状态链路、TCP pose 显示、刀轴向量显示和控制按钮切换;Node proof 路径已通过 `createLinuxCncKinematicsSdk({ moduleId: "xyzac-trt" })` 加载 LinuxCNC kinematics WASM 并生成 frame。浏览器 smoke 仍保留 fixture fallback,不把 fallback 冒充 LinuxCNC runtime proof。
|
||||
这表示 Web 仿真已经具备 RTCP 状态链路、TCP pose 显示、刀轴向量显示和控制按钮切换;Node 和浏览器路径均已通过 `createLinuxCncKinematicsSdk({ moduleId: "xyzac-trt" })` 加载 LinuxCNC kinematics WASM 并生成 frame,浏览器默认使用 Worker 隔离 kinematics WASM 调用。fixture fallback 仍保留为 runtime load failure 的 UI 安全路径,但 smoke 不再把 fixture fallback 当作当前 proof。
|
||||
|
||||
当前普通 G-code 程序执行也已接入 `createLinuxCncInterpSdk()`:
|
||||
|
||||
```text
|
||||
sourceMode=linuxcnc-interpreter-wasm
|
||||
semanticBoundary=linuxcnc_interpreter_wasm_canonical_events
|
||||
RUN/STEP source=LinuxCNC canonical motion events
|
||||
remapRuntimeReady=false
|
||||
plannerRuntimeReady=false
|
||||
fullLinuxCncProgramExecutionReady=false
|
||||
```
|
||||
|
||||
这只提升普通 G-code canonical execution source,不代表 Python remap、tool DB、external user-M process 或完整 planner 已 promoted。
|
||||
|
||||
### Step 3:gmoccapy UI 组件
|
||||
|
||||
@@ -432,6 +445,55 @@ readiness
|
||||
- Browser canvas nonblank smoke;
|
||||
- 文档 traceability 检查。
|
||||
|
||||
### Step 9:LinuxCNC TP queue timing runtime
|
||||
|
||||
目标:
|
||||
|
||||
- 删除真实 G-code 路径上的
|
||||
`linuxcnc_canonical_motion_timing_estimate_not_planner_queue` 边界;
|
||||
- 将 interpreter 生成的 LinuxCNC canonical motion events 输入从
|
||||
`linuxcnc/src/emc/tp` 移植构建出的 WASM runtime;
|
||||
- 用 `tpCreate()`、`tpSetCycleTime()`、`tpSetVmax()`、`tpSetVlimit()`、
|
||||
`tpSetAmax()`、`tpSetTermCond()`、`tpAddLine()`、`tpRunCycle()` 和
|
||||
`tpGetPos()` 生成程序级 queue timing;
|
||||
- UI 的 elapsed/remaining/current velocity 来自 TP queue runtime 输出,而不是
|
||||
JavaScript 按距离和进给率估算。
|
||||
|
||||
实现步骤:
|
||||
|
||||
1. 在 `wasm-port/runtime/core/linuxcnc_wrap/linuxcnc_tp_wasm.c` 新增
|
||||
`lctp_run_canonical_motion_timing()` C ABI。
|
||||
2. 输入只接受 interpreter runtime 已解析出的 canonical motion JSON;C 侧只做字段读取、
|
||||
TP enqueue 和 cycle loop,不解释 G-code。
|
||||
3. 在 `wasm-port/runtime/sdk/src/linuxcnc-tp.js` 新增 TP SDK,负责加载
|
||||
`build/wasm/tp/linuxcnc_tp.{js,wasm}` 并调用 C ABI。
|
||||
4. 在 Web interpreter runtime 中可选接入 `createLinuxCncTpSdk()`;`runProgram()` 和
|
||||
`runMachineFileProgram()` 完成 canonical motion 后立即跑 TP queue timing。
|
||||
5. `programExecution.summary.plannerRuntimeReady=true` 只在 TP runtime 调用成功且
|
||||
motionCount 一致时成立;否则保留 canonical execution,但不能把 planner timing 标为 ready。
|
||||
6. `web-rtcp-5axis-full-linuxcnc-execution-boundary` 可把 `plannerRuntimeReady=true` 作为
|
||||
已满足项,但仍必须显示 `nativeTaskReady=false`、`nativeHalSyncReady=false` 和
|
||||
`fullLinuxCncProgramExecutionReady=false`,因为 native task/NML、HAL realtime thread 和
|
||||
硬件驱动没有接入。
|
||||
|
||||
当前边界:
|
||||
|
||||
```text
|
||||
sourceMode=linuxcnc-interpreter-wasm
|
||||
timing.semanticBoundary=linuxcnc_tp_queue_runtime_timing_from_canonical_motion
|
||||
plannerRuntimeReady=true
|
||||
nativeTaskReady=false
|
||||
nativeHalSyncReady=false
|
||||
fullLinuxCncProgramExecutionReady=false
|
||||
```
|
||||
|
||||
不允许:
|
||||
|
||||
- 用 JS 重写 lookahead、blend、exact stop、S-curve 或 G-code modal 语义;
|
||||
- 把 TP queue timing 说成已经驱动硬件;
|
||||
- 把 native LinuxCNC task/NML/realtime HAL 说成已经完成;
|
||||
- 对没有通过 TP runtime 的 operator MDI lightweight path 标记 planner ready。
|
||||
|
||||
## 5. 禁止事项
|
||||
|
||||
- 不在 JavaScript 中实现 G-code 解释器。
|
||||
@@ -439,7 +501,11 @@ readiness
|
||||
- 不把 gmoccapy Python/GTK runtime 移植进浏览器。
|
||||
- 不把 Python remap/tool DB/external user-M process 伪装成已支持。
|
||||
- 不用 UI fixture 结果冒充 LinuxCNC runtime proof。
|
||||
- 用于 5 轴 machine-file backed run 的 G-code 必须来自 LinuxCNC 源程序目录
|
||||
`configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/*.ngc`;
|
||||
用户上传或手写的 G-code 只能作为 operator file/普通 interpreter 输入,不得标记为
|
||||
`linuxcnc-vendored-5axis-gcode` 或用于 5 轴源程序边界证明。
|
||||
|
||||
## 6. 开工建议
|
||||
|
||||
当前已完成 Step 1 到 Step 7 的 Node 侧 LinuxCNC kinematics proof。下一轮应把 browser asset copy/worker 接入完成,让真实浏览器也能加载 kinematics WASM;或继续推进 interpreter/remap/planner,使 program execution 从 fixture line playback 升级。
|
||||
当前已完成 Step 1 到 Step 9 的 Node/browser LinuxCNC kinematics proof、浏览器 Worker kinematics 隔离、浏览器 Worker interpreter canonical execution source、`xyzac-trt`/`xyzbc-trt` profile 切换、OPFS 五轴会话保存/恢复、OPFS machine-file staging、machine-file backed `fiveAxisRemap` C ABI run、程序级 `M428/M429` switchkins RTCP 自动切换、LinuxCNC TP queue timing runtime、full execution boundary audit,以及真实 LinuxCNC TRT 5 轴 `.ngc` 源程序 staging/选择/运行路径。`M428/M429/M430` 当前既可作为 Web runtime switchkins 事件驱动 `lckins_switch()`,也可在 staged machine-file run 中交给 vendored LinuxCNC five-axis remap C ABI 验证;只有 LinuxCNC source manifest 中的 `configs/sim/axis/vismach/5axis/table-rotary-tilting/demos/*.ngc` 可作为 `linuxcnc-vendored-5axis-gcode` 进入 UI 和 machine-file run。`web-rtcp-5axis-full-linuxcnc-execution-boundary` 可以在真实 interpreter canonical motion 已通过 TP WASM 时报告 `plannerRuntimeReady=true`,但必须继续把 `nativeTaskReady=false`、`nativeHalSyncReady=false`、`fullLinuxCncProgramExecutionReady=false` 和 `promotionAllowed=false` 显示为 blocker,除非后续真正接入 native task/NML 和 realtime HAL sync。
|
||||
|
||||
Reference in New Issue
Block a user