feat(扫描): 新增大车架402四站独立扫描路径
从已发布Y退50低位版复制,AGV站点改为LM402、LM404、LM406、LM408。 同步站点长度和距离输入名称,完整保留机械臂几何、速度、采集和安全规则。 专用只读接口核实四站ID,正常发布V1,原方案保持不变。
This commit is contained in:
parent
ae84b872f8
commit
706599f5e2
17
deploy/windows11/RELEASE-20261127-large-frame-402.md
Normal file
17
deploy/windows11/RELEASE-20261127-large-frame-402.md
Normal file
@ -0,0 +1,17 @@
|
||||
# 大车架扫描路径V1(独立副本)
|
||||
|
||||
按用户指定名称新建并经本次明确确认发布“大车架扫描路径”,方法ID `50a0c6a9aca0422a9ca7cfae6aa1acdf`,流程ID `4eb5c84ed0728e1e330c93aca25c1067`,V1版本ID `263269a4367e55308a8549ff9ebeb6af`,对应草稿修订1,291节点、15项输入。源为Y退50低位版V1 `a02ccea8e279e8c9caf0acb6d6cb1dc9`,源方法和已发布图保持不变。
|
||||
|
||||
## 站点变更
|
||||
|
||||
AGV顺序改为LM402→LM404→LM406→LM408,分别对应原LM302/304/306/308。通过专用只读listStations接口核实当前地图返回这四个完整ID;未调用导航、切图、使能或泛用命令,不登记人工占用。
|
||||
|
||||
四站长度A和距离2的输入名称、点集输出字段、代码中对应分区键及引用同步为LM402/404/406/408,避免页面仍显示旧站名。新维护入口为 `scripts/frame_scan/build_large_frame_scan.mjs`,仅从固定源发布版本离线生成独立副本;不修改旧维护代码。
|
||||
|
||||
## 保持项与核对
|
||||
|
||||
将新图四个站名反向映射后与原图完整相等,节点ID、边、所有数值及设备动作参数保持。正端X=A/2+100mm、负端X=-A/2-100mm;输入参考最低Z=B、参考最高T=B+H,RX=-2为[B+200,T+100],RX=-1.1为[B−100,T−300]。初始/衔接/退出Y退50mm、逐层工具自身Z正反90°、实际N层、停稳门和原安全动作保持。
|
||||
|
||||
LM404/LM408沿用长边默认80mm/s,LM402/LM406沿用短边默认100mm/s;点间距0.7,亮度17不变。仍需各站Base X=0现场对准样品中心、正确设置长度和距离2,并确认顶部、低位及50mm退让切换空间。站点存在核实不代替全路径可达与避碰验证。
|
||||
|
||||
正常发布后核对完整图及15项配置(四站各长度/距离2)、站点顺序和原源图/冻结配置保持。未运行现场设备;本次发布不需要重启现有平台。
|
||||
39
scripts/frame_scan/build_large_frame_scan.mjs
Normal file
39
scripts/frame_scan/build_large_frame_scan.mjs
Normal file
@ -0,0 +1,39 @@
|
||||
import fs from 'node:fs'
|
||||
import assert from 'node:assert/strict'
|
||||
|
||||
// Independent copy of the published Y50 path. No publication or device call.
|
||||
const [snapshotPath, outputPath, summaryPath] = process.argv.slice(2)
|
||||
if (!snapshotPath || !outputPath) throw new Error('Usage: node build_large_frame_scan.mjs <Y50-V1-snapshot.json> <flow.json> [summary.json]')
|
||||
const snapshot = JSON.parse(fs.readFileSync(snapshotPath, 'utf8').replace(/^\uFEFF/, ''))
|
||||
assert.equal(snapshot.published.id, 'a02ccea8e279e8c9caf0acb6d6cb1dc9', 'Review another source version first')
|
||||
const original = JSON.parse(snapshot.published.flowData)
|
||||
const mapping = { LM302: 'LM402', LM304: 'LM404', LM306: 'LM406', LM308: 'LM408' }
|
||||
const reverse = Object.fromEntries(Object.entries(mapping).map(([a,b]) => [b,a]))
|
||||
function remap(value, names) {
|
||||
if (typeof value === 'string') return value.replace(/LM(?:302|304|306|308|402|404|406|408)/g, name => names[name] || name)
|
||||
if (Array.isArray(value)) return value.map(v => remap(v,names))
|
||||
if (value && typeof value === 'object') return Object.fromEntries(Object.entries(value).map(([key,v]) => [remap(key,names),remap(v,names)]))
|
||||
return value
|
||||
}
|
||||
assert(!JSON.stringify(original).includes('LM402') && !JSON.stringify(original).includes('LM404') && !JSON.stringify(original).includes('LM406') && !JSON.stringify(original).includes('LM408'))
|
||||
const graph = remap(original, mapping)
|
||||
assert.deepEqual(remap(graph, reverse), original, 'Only station identifiers and their corresponding labels/parameter names may change')
|
||||
assert.equal(graph.nodes.length, 291)
|
||||
const byId = new Map(graph.nodes.map(n => [n.id,n])), order = []
|
||||
for (let n=graph.nodes.find(n=>n.type==='start'); n;) {
|
||||
assert(!order.includes(n), 'Unexpected root cycle'); order.push(n)
|
||||
const edges=graph.edges.filter(e=>e.sourceNodeId===n.id); assert(edges.length<=1)
|
||||
n=edges.length?byId.get(edges[0].targetNodeId):null
|
||||
}
|
||||
const stations=order.filter(n=>n.properties.action==='AGV_MOVE_TO_STATION').map(n=>n.properties.nodeParams.find(p=>p.name==='stationId').input)
|
||||
assert.deepEqual(stations,['LM402','LM404','LM406','LM408'])
|
||||
assert(!JSON.stringify(graph).match(/LM30[2468]/))
|
||||
assert.deepEqual(graph.edges,original.edges)
|
||||
for(const n of graph.nodes.filter(n=>n.properties.action==='SCANNER_PARAMETERS')) {
|
||||
const body=JSON.parse(n.properties.nodeParams.find(p=>p.name==='requestJson').input)
|
||||
assert.equal(body.pointDistance,0.7); assert.equal(body.brightness,17)
|
||||
}
|
||||
fs.writeFileSync(outputPath,JSON.stringify(graph,null,2))
|
||||
const summary={name:'大车架扫描路径',stations,nodes:graph.nodes.length,inputCount:graph.nodes.find(n=>n.type==='start').properties.inputParams.length,onlyStationNamesChanged:true,published:false,deviceCommandsSent:0}
|
||||
if(summaryPath)fs.writeFileSync(summaryPath,JSON.stringify(summary,null,2))
|
||||
console.log(JSON.stringify(summary))
|
||||
Loading…
Reference in New Issue
Block a user