commit ba674dca8699e37144cbe81fed4cc770085b961c Author: Floppyrj45 Date: Sun Apr 19 17:49:39 2026 +0200 init: structure projet SLAM stéréo BlueOS diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3a728c7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,71 @@ +# Python +__pycache__/ +*.py[cod] +*.pyo +*.pyd +.Python +*.egg +*.egg-info/ +dist/ +build/ +eggs/ +parts/ +var/ +sdist/ +develop-eggs/ +.installed.cfg +lib/ +lib64/ +*.so +.env +.venv +env/ +venv/ +ENV/ +pip-log.txt +pip-delete-this-directory.txt +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.log +.pytest_cache/ +.mypy_cache/ + +# ROS2 +*.pyc +log/ +install/ +build/ +.colcon_install_layout + +# Datasets (trop lourds pour git) +datasets/* +!datasets/.gitkeep +!datasets/README.md + +# Calibration output (généré) +config/stereo_calib.yaml + +# Sphinx build +docs/build/ + +# IDE +.vscode/ +.idea/ +*.swp +*.swo + +# OS +.DS_Store +Thumbs.db +desktop.ini + +# Docker +.dockerignore + +# Logs +*.log diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9ed3601 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Baptiste Moulin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..3d8e38c --- /dev/null +++ b/README.md @@ -0,0 +1,108 @@ +# SLAM Stéréo BlueOS — AUV Sous-Marin Autonome + +SLAM visuel stéréo pour drone sous-marin (AUV) intégré BlueOS. +Stack: ORB-SLAM3 + ROS2 Humble + Python + Flask. + +## Objectifs + +- Localisation et cartographie 3D temps réel en milieu sous-marin +- Portée cible : **0.5 m – 5 m** (visibilité eau douce/mer côtière) +- Baseline stéréo : **11 cm** (médiane 10-12 cm optimale) +- Déploiement : Raspberry Pi 4B sous BlueOS (Docker extension) +- Interface web Flask pour monitoring et calibration + +## Hardware + +| Composant | Modèle | Quantité | +|-----------|--------|----------| +| SBC | Raspberry Pi 4B (4 GB) | 1 | +| Caméra gauche | Microsoft LifeCam HD-3000 | 1 | +| Caméra droite | Microsoft LifeCam HD-3000 | 1 | +| IMU | À définir (MPU-6050 ou ICM-20689) | 1 | +| Support | Impression 3D PETG (voir /hardware/) | 1 | + +## Schéma Baseline Stéréo + +``` + CAMÉRA GAUCHE CAMÉRA DROITE + | | + |<------- B = 11cm ----->| + | | + _____|_____ _____|_____ + | [o] f | | f [o] | + |___________| |___________| + | | + | AUV | + |_______________________| + + Z_max = f * B / d_min + = 525 px * 0.11 m / 1 px + ≈ 57.75 m (théorique, ~5 m pratique sous-marin) + + Z_min = f * B / d_max + = 525 * 0.11 / 64 + ≈ 0.9 m +``` + +## Quick Start + +### 1. Calibration stéréo (PC) + +```bash +# Capturer les paires de damier +python src/calibration/stereo_capture.py + +# Calibrer +python src/calibration/stereo_calibrate.py +# → génère config/stereo_calib.yaml +``` + +### 2. Déploiement Pi + +```bash +bash scripts/deploy_pi.sh +``` + +### 3. Interface web + +```bash +cd src/interface && python app.py +# → http://localhost:5000 +``` + +### 4. Documentation Sphinx + +```bash +pip install sphinx sphinx-rtd-theme sphinxcontrib-bibtex myst-parser +sphinx-build -b html docs/source docs/build +# → ouvrir docs/build/index.html +``` + +## Structure + +``` +SLAM_Stereo_BlueOS/ +├── src/ +│ ├── calibration/ # Calibration stéréo OpenCV +│ ├── slam/ # Wrapper ORB-SLAM3 +│ └── interface/ # Flask web UI +├── docs/ # Sphinx documentation +├── hardware/ # OpenSCAD support caméras +├── datasets/ # (gitignored — trop lourds) +├── scripts/ # Deploy SSH Pi +├── config/ # YAML calibration + params +└── Dockerfile # BlueOS extension +``` + +## Dépendances Python + +``` +opencv-python>=4.8 +flask>=3.0 +numpy>=1.24 +pyyaml>=6.0 +``` + +## Licence + +MIT — Baptiste Moulin 2026 diff --git a/datasets/.gitkeep b/datasets/.gitkeep new file mode 100644 index 0000000..e69de29