From 6ac3a382c71fb3a274fdaeadd93ae520258650c2 Mon Sep 17 00:00:00 2001 From: Poulpe Date: Tue, 21 Apr 2026 12:53:57 +0000 Subject: [PATCH] =?UTF-8?q?dispatcher=20=E2=80=94=20stitch=20passthrough?= =?UTF-8?q?=20pour=20acquisition=201=20seul=20PLY?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- scripts/dispatcher.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/dispatcher.py b/scripts/dispatcher.py index 01ed6a7..2540d5c 100644 --- a/scripts/dispatcher.py +++ b/scripts/dispatcher.py @@ -296,13 +296,24 @@ def run_one_stitch(stitch: sqlite3.Row): rows = [] 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", - error=f"Pas assez de PLY disponibles ({len(ply_paths)})", + error="Aucun PLY disponible", finished_at=_now_iso()) return 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) cmd = (