refactor(pose_3d): rimuovi agent/chat, aggiungi cloud+diagnostics+camera polso
Rimosso il modulo agent (LLM chat) e la relativa config OpenRouter. La tab Pose 3D ora: espone i giunti reali via G1 /diagnostics per specchiare l'URDF senza IK; acquisisce point cloud Nuwa+D435i (/api/pose_3d/clouds); mostra il modello 3D della camera sul polso; degrada gracefully a 200 (wrist=null) quando il robot è offline. Il vecchio renderer canvas-2D (app.js view3d + diagnostic3d.js) è stato consolidato nel viewport Three.js di pose_3d.js. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
9d30073d57
commit
6c2452fe20
20 files changed
+152757
-2714
No files matched your search
@@ -30,17 +30,26 @@ def test_state_returns_both_wrists():
|
||||
assert body["wrist"]["right"]["position"] == [0.30, -0.20, 0.30]
|
||||
assert "poses" in body
|
||||
assert "live_max_step_m" in body
|
||||
assert "right_wrist_camera" in body
|
||||
assert body["robot_active"] in ("g1", "h1")
|
||||
|
||||
|
||||
def test_state_502_when_g1_unavailable():
|
||||
def test_state_returns_200_with_wrist_null_when_g1_unavailable():
|
||||
# La tab deve restare utilizzabile per editare config / pose salvate
|
||||
# e visualizzare il modello anche senza robot vivo.
|
||||
from presa_mano.clients import G1Unavailable
|
||||
with patch("presa_mano.api.pose_3d_routes._deps.g1") as g1_factory:
|
||||
g1 = MagicMock()
|
||||
g1.wrist.side_effect = G1Unavailable("connection refused")
|
||||
g1_factory.return_value = g1
|
||||
r = client.get("/api/pose_3d/state")
|
||||
assert r.status_code == 502
|
||||
assert r.status_code == 200
|
||||
body = r.json()
|
||||
assert body["wrist"] is None
|
||||
assert "G1 unavailable" in (body.get("robot_error") or "")
|
||||
# config esposta comunque
|
||||
assert "right_wrist_camera" in body
|
||||
assert "poses" in body
|
||||
|
||||
|
||||
def test_apply_dry_run_calls_g1_with_dry_run_true():
|
||||
|
||||
Reference in new issue
Block a user