From ece217167806acc52e39ee6938d9c95a93f2f2fc Mon Sep 17 00:00:00 2001 From: henrytherobot Date: Mon, 18 May 2026 17:22:51 +0200 Subject: [PATCH] =?UTF-8?q?docs:=20detach=20from=20H1=20fork=20=E2=80=94?= =?UTF-8?q?=20rename=20project=20to=20RealSense-D435i-G1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This repo is now an independent project tracking the G1 deploy. The upstream remote points to RealSense-D435i-G1 on git.humion.it and the default branch is `main`. The H1 repo (RealSense-D435-H1) is now a separate sibling project, linked from the README under "Repo correlati". Sweeps the README for stale references to `branch camera-g1`, updates the architecture diagram and repo-tree header to the new project name, and updates rsync/cd paths to the canonical RealSense-D435i-G1 folder. Co-Authored-By: Claude Opus 4.7 (1M context) --- README.md | 57 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index 085c3e3..e321da8 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,11 @@ drop-in replacement del container Nuwa nella pipeline del pestello, così i client esistenti (`pestello-pose-detector`, frontend React, ecc.) consumano frame senza modifiche. -Questo branch (`camera-g1`) è la porta del repo originale H1 verso il -robot **Unitree G1** (Jetson Xavier NX, JetPack 5.1.x). Il repo upstream -è su [git.humion.it](https://git.humion.it/Labotics-OnGianni/RealSense-D435-H1) -— il nome `…-H1` è storico, non cambia il fatto che gira anche su G1. +Questo repo è il deploy per il robot **Unitree G1** (Jetson Xavier NX, +JetPack 5.1.x): [git.humion.it/.../RealSense-D435i-G1](https://git.humion.it/Labotics-OnGianni/RealSense-D435i-G1). +Nasce come fork del repo H1 originale ([RealSense-D435-H1](https://git.humion.it/Labotics-OnGianni/RealSense-D435-H1)), +dal quale conserva la storia git completa fino al commit di porting su +G1. Da quel punto in poi i due progetti evolvono indipendentemente. --- @@ -27,7 +28,7 @@ robot **Unitree G1** (Jetson Xavier NX, JetPack 5.1.x). Il repo upstream │ │ /api/intrinsics │ │ ▼ │ ┌───────────────────┴────┐ │ - │ RealSense-D435-H1 ⬅️ │ ← QUESTO REPO │ + │ RealSense-D435i-G1 ⬅️ │ ← QUESTO REPO │ │ (sul G1, port 8878) │ │ └────────────────────────┘ │ (era: Nuwa-HP60C) │ @@ -101,7 +102,7 @@ da dentro i container). Quindi buildiamo il frontend una volta sull'host, e il Dockerfile copia solo il `dist/` già pronto. ```bash -cd ~/robot/RealSense-D435-H1 +cd ~/robot/RealSense-D435i-G1 docker run --rm --dns 8.8.8.8 \ -v "$(pwd)/src/frontend/react:/app" -w /app \ node:22-alpine sh -c 'npm install && npm run build' @@ -113,7 +114,7 @@ Da rifare solo quando cambi qualcosa sotto `src/frontend/react/`. ### Run ```bash -cd ~/robot/RealSense-D435-H1 +cd ~/robot/RealSense-D435i-G1 # Build + run (la prima volta build di librealsense da source: ~25 min) sg docker -c "docker compose up -d" @@ -221,7 +222,7 @@ CORS_ORIGINS=* Note: - `CAMERA_WIDTH/HEIGHT/FPS` su G1 vengono **rispettati** (USB 3 → tutto - il range supportato dalla D435i è disponibile). Sul branch H1 erano + il range supportato dalla D435i è disponibile). Sul repo H1 erano ignorati e forzati a 640x480@15 YUYV. - `.env` è nel `.gitignore` — non viene committato. Tieni una copia di backup; `.env.example` è la struttura di riferimento. @@ -259,7 +260,7 @@ Il codice "live" gira sul robot. Per modifiche: ```bash # 1. Sul robot G1 -cd ~/robot/RealSense-D435-H1 +cd ~/robot/RealSense-D435i-G1 # ...modifiche... # (se hai toccato il frontend) @@ -277,13 +278,14 @@ rsync -avz --delete \ --exclude='node_modules' --exclude='src/frontend/react/dist' \ --exclude='images/*' --exclude='models/*' \ --exclude='.claude' --exclude='.omc' \ - ~/robot/RealSense-D435-H1/ \ - harry@192.168.123.100:/opt/docker/robotserver/RealSense-D435-H1/ + ~/robot/RealSense-D435i-G1/ \ + harry@192.168.123.100:/opt/docker/robotserver/RealSense-D435i-G1/ # 3. Push da harry (il G1 non può push diretto a git.humion.it — vedi sotto) +# Assicurati che harry abbia un clone del nuovo repo RealSense-D435i-G1 +# in /opt/docker/robotserver/RealSense-D435i-G1 (clone una tantum). ssh harry@192.168.123.100 -cd /opt/docker/robotserver/RealSense-D435-H1 -git checkout camera-g1 +cd /opt/docker/robotserver/RealSense-D435i-G1 git add . && git commit -m "..." && git push ``` @@ -291,20 +293,19 @@ git add . && git commit -m "..." && git push ```bash # 1. Su harry -cd /opt/docker/robotserver/RealSense-D435-H1 -git checkout camera-g1 +cd /opt/docker/robotserver/RealSense-D435i-G1 git pull # o sviluppa direttamente # ...modifiche... git add . && git commit -m "..." && git push # 2. Sul robot G1 -cd ~/robot/RealSense-D435-H1 +cd ~/robot/RealSense-D435i-G1 rsync -avz --delete \ --exclude='.env' --exclude='__pycache__' --exclude='*.pyc' \ --exclude='images/*' --exclude='models/*' \ --exclude='.claude' --exclude='.omc' \ - harry@192.168.123.100:/opt/docker/robotserver/RealSense-D435-H1/ \ - ~/robot/RealSense-D435-H1/ + harry@192.168.123.100:/opt/docker/robotserver/RealSense-D435i-G1/ \ + ~/robot/RealSense-D435i-G1/ # rifare la build frontend se è cambiata, poi: sg docker -c "docker compose build backend && docker compose up -d --force-recreate" @@ -329,7 +330,7 @@ Su G1 questo significa quasi sempre **una di due cose**: v2.50.0. Il D435i fw `05.15.x` non funziona con v2.55+. Controlla `Dockerfile` riga 11 — deve essere `ARG RS_VERSION=v2.50.0`. -Se invece sei sul branch `main` (H1), su USB 2 questo errore è quasi +Se invece stai lavorando sul repo H1, su USB 2 questo errore è quasi sempre un mismatch di profilo color (BGR8 vs YUYV) — vedi STATUS.md. ### `RuntimeError: Failed to resolve request` @@ -388,7 +389,7 @@ Workaround: `rsync` da/verso harry e push da lì. Vedi ## Struttura del repo ``` -RealSense-D435-H1/ +RealSense-D435i-G1/ ├── Dockerfile # multi-stage: librealsense v2.50.0 + runtime ├── docker-compose.yml # backend + nats opzionale + frontend-dev ├── .env / .env.example # config (NON committare .env) @@ -417,15 +418,17 @@ RealSense-D435-H1/ --- -## Branches +## Repo correlati -- `main` — deploy storico H1 (D435 su USB 2, YUYV, ~4 fps) -- `camera-g1` — **questo branch**, deploy G1 (D435i su USB 3.2, BGR8, 30 fps) +- **[RealSense-D435i-G1](https://git.humion.it/Labotics-OnGianni/RealSense-D435i-G1)** — questo repo. Deploy G1 (D435i su USB 3.2, BGR8, 30 fps). +- **[RealSense-D435-H1](https://git.humion.it/Labotics-OnGianni/RealSense-D435-H1)** — repo di origine, deploy storico H1 (D435 su USB 2, YUYV, ~4 fps). -Il driver Python è lo stesso su entrambi — distingue il path runtime -leggendo `usb_type_descriptor` del device. Le differenze tra branch sono -nel `Dockerfile` (versione SDK, stage frontend) e nel `.env` (identità -servizio). +Il driver Python è lo stesso su entrambi i repo (almeno al momento del +fork): distingue il path runtime leggendo `usb_type_descriptor` del +device. Le differenze tra i due repo sono nel `Dockerfile` (versione +SDK librealsense, stage di build del frontend) e nel `.env` (identità +servizio). Patch ai due path runtime andrebbero portate manualmente da +un repo all'altro quando rilevanti. ---