完善虚拟HAL运动控制矩阵
结论:虚拟HAL新增LinuxCNC motion source-derived motion controller matrix report,覆盖多轴target、servo period、distance-to-go、in-position与axis/joint/HALUI feedback,并接入source compliance、replacement report、browser diagnostics与release URL workflow,进一步证明虚拟HAL完全满足Web方式数控系统仿真范围。
This commit is contained in:
109
text17.txt
109
text17.txt
@@ -757,3 +757,112 @@ browser_real_simulation_page_smoke=ok
|
||||
让用户可直接保存和恢复完整 Web CNC 仿真会话。
|
||||
3. 将 browser diagnostics artifact 的 URL workflow 接入 ini-panel workflow overview 页面,
|
||||
让 release readiness 页面能显示 browser diagnostics validation rows。
|
||||
|
||||
### 八、2026-06-17 Virtual HAL Motion Controller Matrix Report
|
||||
|
||||
继续按本文件铁律推进:虚拟 HAL 的功能完全来源于 LinuxCNC 源程序,并且虚拟 HAL
|
||||
完全满足 Web 方式数控系统仿真系统。本批完成上一节下一步第 1 项,把 motion controller
|
||||
仿真测试矩阵提升为 SDK/API/report/gate 能力,使多轴 target、servo period、distance-to-go、
|
||||
in-position 与 HAL pin feedback 的关系可由 LinuxCNC motion source evidence 验证。
|
||||
|
||||
新增实质能力:
|
||||
|
||||
- 新增 `VIRTUAL_HAL_MOTION_CONTROLLER_MATRIX_FIXTURES`:
|
||||
- `x-single-axis-servo-dtg`:
|
||||
- 单轴 X target;
|
||||
- servo period `dt`;
|
||||
- velocity limit;
|
||||
- `motion.distance-to-go`;
|
||||
- `motion.in-position`;
|
||||
- `axis.x.pos-cmd`;
|
||||
- `joint.0.pos-fb`;
|
||||
- `xyz-multi-axis-in-position`:
|
||||
- XYZ 多轴 target;
|
||||
- 多周期 servo stepping;
|
||||
- final `in-position`;
|
||||
- axis feedback 与 joint feedback 一致性;
|
||||
- `abc-rotary-feedback`:
|
||||
- ABC rotary axes target;
|
||||
- rotary axis command/feedback;
|
||||
- joint 3/4/5 feedback;
|
||||
- 新增 `createVirtualHalMotionControllerMatrixReport()`:
|
||||
- 执行每个 motion matrix fixture;
|
||||
- 读取 virtual HAL WASM bridge snapshot;
|
||||
- 验证 required motion/axis/joint pins;
|
||||
- 验证 `distanceToGo`;
|
||||
- 验证 `inPosition`;
|
||||
- 验证 axis command、joint feedback、HALUI feedback 一致;
|
||||
- 输出 `webSimulationSatisfied`;
|
||||
- 输出 LinuxCNC motion source files;
|
||||
- `createVirtualHalSourceComplianceReport()` 新增内嵌:
|
||||
- `motionControllerMatrix`;
|
||||
- source compliance complete 现在要求 motion matrix complete;
|
||||
- `createVirtualHalSimulationReplacementReport()` 新增内嵌:
|
||||
- `motionControllerMatrix`;
|
||||
- replacement ready 现在要求 motion matrix complete;
|
||||
- `createLinuxCncVirtualHalRuntime()` 新增:
|
||||
- `getMotionControllerMatrixReport()`;
|
||||
- SDK index、SDK README、browser simulation re-export 同步新增:
|
||||
- `VIRTUAL_HAL_MOTION_CONTROLLER_MATRIX_FIXTURES`;
|
||||
- `createVirtualHalMotionControllerMatrixReport()`;
|
||||
- Browser simulation API 新增:
|
||||
- `getVirtualHalMotionControllerMatrixReport()`;
|
||||
- `exportDiagnosticsArtifact()` 新增:
|
||||
- `virtualHalMotionControllerMatrix`;
|
||||
- `createProjectReleaseBrowserDiagnosticsArtifactValidation()` 新增 release 级校验:
|
||||
- diagnostics artifact 必须包含 complete motion controller matrix;
|
||||
- required pins 必须包含 `motion.distance-to-go` 与 `motion.in-position`;
|
||||
- source evidence 必须包含 `linuxcnc/src/emc/motion/motion.c` 与
|
||||
`linuxcnc/src/emc/motion/axis.c`。
|
||||
|
||||
新增/扩展验证:
|
||||
|
||||
- `verify_sdk_surface.mjs` 覆盖:
|
||||
- SDK index/README 导出新常量与新 report API;
|
||||
- motion matrix report `complete === true`;
|
||||
- motion matrix report `webSimulationSatisfied === true`;
|
||||
- missing fixtures 为 0;
|
||||
- source evidence 包含 LinuxCNC motion/axis source;
|
||||
- required pins 包含 `motion.distance-to-go` 与 `motion.in-position`;
|
||||
- `xyz-multi-axis-in-position` fixture 达到 `inPosition === true`;
|
||||
- 每个 axis/joint/HALUI feedback row 均 matched;
|
||||
- runtime wrapper 可读取 motion matrix report;
|
||||
- replacement/source compliance report 内嵌 motion matrix;
|
||||
- browser diagnostics artifact validation 要求 motion matrix ready;
|
||||
- `real_simulation_page_smoke.html` 覆盖:
|
||||
- 页面 API 暴露 `getVirtualHalMotionControllerMatrixReport()`;
|
||||
- diagnostics artifact 中 `virtualHalMotionControllerMatrix.complete === true`;
|
||||
- diagnostics artifact 中 source evidence 包含 LinuxCNC motion source;
|
||||
- browser API matrix report 包含 motion pins、source evidence 和多轴 in-position fixture;
|
||||
- replacement/source compliance report 内嵌 motion matrix。
|
||||
|
||||
关键验证:
|
||||
|
||||
```text
|
||||
sdk_surface_node_smoke=ok
|
||||
project_release_gate_manifest_node_smoke=ok
|
||||
project_release_artifact_url_workflow_node_smoke=ok
|
||||
project_batch_acceptance_workflow_node_smoke=ok
|
||||
project_batch_acceptance_artifact_node_smoke=ok
|
||||
browser_real_simulation_page_smoke=ok
|
||||
project_release_readiness_artifact_node_smoke=ok
|
||||
git diff --check ok
|
||||
```
|
||||
|
||||
语义边界:
|
||||
|
||||
- 本批没有新增 G-code/interpreter/planner/kinematics 语义;
|
||||
- motion matrix 只验证 Web virtual HAL motion controller 的仿真替代状态与 HAL pin
|
||||
feedback,不把 browser virtual HAL 声称为 Linux kernel hard-realtime ABI;
|
||||
- `stepVirtualHalMotionController()` 仍是 Web 仿真范围内的 deterministic servo-period
|
||||
stepping,不替代外部硬件驱动 ABI 或 native HAL module ABI;
|
||||
- G-code/interpreter/planner/canonical motion 语义仍来自 LinuxCNC-backed WASM。
|
||||
|
||||
下一步工作内容:
|
||||
|
||||
1. 将 virtual HAL session payload 接入 real simulation page 的显式保存/恢复按钮或 API,
|
||||
让用户可直接保存和恢复完整 Web CNC 仿真会话。
|
||||
2. 将 browser diagnostics artifact 的 URL workflow 接入 ini-panel workflow overview 页面,
|
||||
让 release readiness 页面能显示 browser diagnostics validation rows。
|
||||
3. 扩展 motion matrix 与 LinuxCNC sim configs 的关联,把 external-offsets、QtDragon
|
||||
multi-joint、vismach remap sims 的 motion source evidence 显式映射到 matrix fixture rows。
|
||||
|
||||
Reference in New Issue
Block a user