Files
Flag 85e9a4d4b0 feat(moulin-mapper): simulateur capteurs + pipeline SLAM Python (JSONL stream → trajectoire + nuage .ply)
- simulator.py: flux JSONL réaliste (Ping360 angle/dist, IMU, heading, depth, altitude) + vérité terrain
- slam.py: dead-reckoning + scan-to-map ICP 2D (cKDTree) + fermeture de boucle
- process.py: ingestion streaming ligne-par-ligne → trajectory.csv + map_2d.csv + cloud.ply
- stream_replay.py: rejoue le flux (vision streaming remote)
- SCHEMA.md: contrat format données ROV réel↔sim
- RMS dead-reckoning 0.386m → scan-matching 0.188m (2x)
2026-06-06 20:01:22 +00:00
..

moulin-mapper / pipeline

Pipeline SLAM 2D pour cartographie de chambre de moulin via Ping360 + BlueROV.

Prérequis

pip install numpy scipy
# ou dans un venv :
python3 -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt

Lancement complet

cd pipeline/

# 1. Simuler un run complet
python3 simulator.py
# → data/sim/run_L.jsonl  (flux capteurs)
# → data/sim/run_L_truth.csv  (vérité terrain)

# 2. Traiter le flux et exporter
python3 process.py
# → data/out/trajectory.csv
# → data/out/map_2d.csv
# → data/out/cloud.ply
# Affiche RMS dead-reckoning vs scan-matching

# 3. Streaming pipe (simule flux réseau live)
python3 stream_replay.py | python3 process.py --stdin
# ou acceleré 10x avec timing réel :
python3 stream_replay.py --realtime --speed 10 | python3 process.py --stdin

Fichiers

Fichier Rôle
SCHEMA.md Contrat de format du flux JSONL
room.py Géométrie chambre + raycast 2D
simulator.py Génère données simulées réalistes
slam.py Dead-reckoning + ICP + fermeture de boucle
process.py Pipeline streaming complet, exports
stream_replay.py Rejoue JSONL sur stdout (pipe vers process.py)

Brancher le vrai ROV

Remplacer la source dans process.py par le flux réseau BlueROV :

# Exemple : flux TCP depuis ArduSub
import socket
sock = socket.create_connection(("192.168.x.x", PORT))
run_pipeline(sock.makefile(), truth_path=None, out_dir="data/out")

Le format JSONL est défini dans SCHEMA.md — le pipeline est identique sur données simulées et réelles.