feat(config): aggiungi services.front_camera e blocco tab_right_arm
This commit is contained in:
1 parent
779f506701
commit
64742479b1
2 files changed
+54
No files matched your search
@@ -0,0 +1,37 @@
|
||||
"""Verifica che config.yaml contenga le chiavi attese per la tab Braccio DX."""
|
||||
from __future__ import annotations
|
||||
|
||||
import yaml
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
CFG = Path(__file__).resolve().parents[1] / "config.yaml"
|
||||
|
||||
|
||||
def _cfg() -> dict:
|
||||
return yaml.safe_load(CFG.read_text())
|
||||
|
||||
|
||||
def test_front_camera_service_present():
|
||||
c = _cfg()
|
||||
fc = c["services"]["front_camera"]
|
||||
assert fc["base_url"].startswith("http")
|
||||
assert isinstance(fc.get("timeout_s"), (int, float))
|
||||
|
||||
|
||||
def test_tab_right_arm_block_present():
|
||||
c = _cfg()
|
||||
t = c["tab_right_arm"]
|
||||
assert t["yolo_class"] == "pestello"
|
||||
assert 0 < t["yolo_conf_front"] <= 1
|
||||
assert 0 < t["yolo_conf_wrist"] <= 1
|
||||
off = t["move_offset_camera_mm"]
|
||||
assert set(off.keys()) == {"x", "y", "z"}
|
||||
sgn = t["axis_sign_cam_to_wrist"]
|
||||
assert all(sgn[k] in (-1, 1) for k in ("x", "y", "z"))
|
||||
assert isinstance(t["max_step_m"], (int, float))
|
||||
assert "z_floor_m" in t
|
||||
for k in ("home_pose", "custom_pose"):
|
||||
p = t[k]
|
||||
assert len(p["position"]) == 3
|
||||
assert len(p["rpy_deg"]) == 3
|
||||
Reference in new issue
Block a user