dispatcher — stitch passthrough pour acquisition 1 seul PLY

Quand un seul PLY est disponible (1 segment, 1 caméra), aucun alignement
n'est nécessaire. On copie directement le PLY en output et on marque la
stitch done plutôt qu'error. Cross-AUV est quand même tenté si conditions remplies.
This commit is contained in:
Poulpe
2026-04-21 12:53:57 +00:00
parent 69eb547463
commit 6ac3a382c7

View File

@@ -296,13 +296,24 @@ def run_one_stitch(stitch: sqlite3.Row):
rows = [] rows = []
ply_paths = [r["output_ply"] for r in rows if r["output_ply"]] ply_paths = [r["output_ply"] for r in rows if r["output_ply"]]
if len(ply_paths) < 2: if len(ply_paths) == 0:
set_stitch_status(stitch_id, status="error", set_stitch_status(stitch_id, status="error",
error=f"Pas assez de PLY disponibles ({len(ply_paths)})", error="Aucun PLY disponible",
finished_at=_now_iso()) finished_at=_now_iso())
return return
out_ply = f"{worker['frames_dir']}/stitch_{stitch_id}.ply" out_ply = f"{worker['frames_dir']}/stitch_{stitch_id}.ply"
# Single PLY — no alignment needed, pass through directly.
if len(ply_paths) == 1:
rc, _, err = ssh(worker["ssh_alias"], f"cp {shlex.quote(ply_paths[0])} {shlex.quote(out_ply)}")
if rc != 0:
set_stitch_status(stitch_id, status="error", error=f"cp failed: {err[:200]}", finished_at=_now_iso())
return
set_stitch_status(stitch_id, status="done", output_ply=out_ply, finished_at=_now_iso())
print(f" → stitch #{stitch_id} passthrough (1 PLY) → {out_ply}")
_maybe_create_cross_auv_stitch(stitch_id)
return
deploy_stitch_script(worker) deploy_stitch_script(worker)
cmd = ( cmd = (