exp(dagger-deploy): 轮次15——每步规划(commit_n=1):到达 41.8%、time_ok 21.5%(+57%)、ratio 0.259、碰撞 2.3%、967ms(新历史最佳);修复 ok6 视图硬编码

This commit is contained in:
cbb
2026-10-20 06:47:00 +08:00
parent 76ac563d21
commit f5f394a4bf
2 changed files with 18 additions and 1 deletions
+1 -1
View File
@@ -243,7 +243,7 @@ def rollout(model, kin, tasks, device, K=8, safety=False, seed=0, max_sec=None,
pts = qe[:, None] + torch.cumsum(ck, 1)
mids = torch.cat([qe[:, None], pts[:, :-1]], 1) + 0.5 * ck
allq = torch.cat([pts, mids], 1).reshape(-1, 6)
ok6 = (kin.gaps(allq, 0.5)['gm'].min(-1).values > 0).view(B, 6)
ok6 = (kin.gaps(allq, 0.5)['gm'].min(-1).values > 0).view(B, 2 * commit_n)
okstep = ok6[:, :commit_n] & ok6[:, commit_n:] # 每步:步点与其中点都安全
plen = torch.cumprod(okstep.long(), 1).sum(1) # 安全前缀长度 0..3
take = plen > maxlen