Files
Presa-Mano/config.yaml
T
Adriano Dal PastroandClaude Opus 4.7 ac573505b7 feat: initial commit — orchestratore presa-mano con AI assistant + dual-robot
Pipeline completa per calibrazione hand-eye e grasp planning su robot
Unitree G1/H1 con camera depth Nuwa-HP60C. Esposta come FastAPI + GUI vanilla
JS, con assistente AI (OpenRouter + tool calling curato) per pilotare il
sistema in linguaggio naturale.

Architettura:
- FastAPI orchestrator (porta da .env, default 8890) che coordina 4
  microservizi upstream: Nuwa-HP60C, marker-finder, YOLO, robot bridge.
- Dual-robot: services.g1 e services.h1 in config.yaml; switchabili a
  runtime via PUT /api/home/robot.
- Calibrazione hand-eye eye-to-hand split per-side (right/left).
- Marker pose: marker-finder riceve gli intrinseci RGB della Nuwa al boot,
  PnP server-side con quei dati. Nessun re-PnP locale richiesto.
- Depth-to-RGB: registrazione iterativa IR↔RGB per back-projection 3D
  corretta (Nuwa /api/measure usa coords IR; il nostro /api/perception/
  measure_rgb prende pixel RGB e ritorna 3D nel frame RGB OpenCV).
- Correzione affine sul depth bias (calibrabile via marker come
  ground-truth) — riduce errore Z da ~6% a ~1.5% nei test.
- AI assistant: 16 tool curati (move_wrist_*, hand_action, get_marker[_3d],
  detect_object, calibration_*, set_active_robot…), system prompt
  dinamico che riflette robot attivo + marker config + addendum
  customizzabile da GUI. Temperature di default 0.1 per evitare invenzioni.

GUI (7 tab):
- Home: stato comunicazione device + selettore robot attivo G1/H1
- Assistente AI: chat con OpenRouter, history persistita lato browser,
  task riutilizzabili (prompt salvati), trace tool calls
- Impostazioni AI: modello da combo curata, temperature, max iterations,
  prompt addendum, anteprima system prompt
- Calibrazione, Auto-Calibrazione, TrovaUtensile, Servo Visuale, Vista 3D,
  Movimento EE — invariate dalle versioni precedenti

Setup:
- Variabili in presa-mano/.env (template in .env.example)
- OPENROUTER_API_KEY richiesta solo per il tab Assistente AI
- PRESA_MANO_PORT configurabile

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-06 13:28:23 +02:00

58 lines
1.3 KiB
YAML

services:
nuwa:
base_url: http://localhost:8877
timeout_s: 5.0
api_key: null
marker_finder:
base_url: http://localhost:8082
timeout_s: 5.0
yolo:
base_url: http://localhost:8879
timeout_s: 10.0
g1:
base_url: http://localhost:8765
timeout_s: 5.0
write_timeout_s: 30.0
h1:
base_url: http://localhost:8767
timeout_s: 5.0
write_timeout_s: 30.0
aruco:
dictionary: DICT_4X4_50
wrist_marker:
id: 20
size_mm: 103.0
robot:
wrist_side: right
active: h1
grasp:
approach_offset_m: 0.1
pre_grasp_clearance_m: 0.05
max_object_width_m: 0.08
pointcloud_step: 1
pointcloud_max_depth_mm: 2000
visual_servo:
min_distance_m: 0.1
step_fraction: 0.5
wrist_marker_rvec:
- 0
- 0
- 0
calibration:
min_samples: 5
method: TSAI
file: data/calibration.yaml
samples_file: data/samples.json
chat:
openrouter:
base_url: https://openrouter.ai/api/v1
model: anthropic/claude-sonnet-4.5
timeout_s: 60.0
max_tool_iterations: 8
temperature: 0.1
api_key_env: OPENROUTER_API_KEY
referer: http://localhost:8890
title: presa-mano
user_prompt_addendum: L'operatore preferisce risposte molto telegrafiche, max
3 righe se possibile. Misure sempre in mm interi.