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
+17
@@ -25,6 +25,9 @@ services:
|
||||
timeout_s: 30.0
|
||||
api_key_env: OPEN3D_API_KEY
|
||||
max_stl_bytes: 20000000
|
||||
front_camera:
|
||||
base_url: http://192.168.123.99:8878
|
||||
timeout_s: 5.0
|
||||
aruco:
|
||||
dictionary: DICT_4X4_50
|
||||
wrist_marker:
|
||||
@@ -33,6 +36,20 @@ aruco:
|
||||
robot:
|
||||
wrist_side: left
|
||||
active: h1
|
||||
tab_right_arm:
|
||||
yolo_class: pestello
|
||||
yolo_conf_front: 0.4
|
||||
yolo_conf_wrist: 0.4
|
||||
move_offset_camera_mm: { x: 0, y: 0, z: 100 }
|
||||
axis_sign_cam_to_wrist: { x: 1, y: -1, z: -1 }
|
||||
max_step_m: 0.15
|
||||
z_floor_m: null
|
||||
home_pose:
|
||||
position: [0.30, -0.20, 0.30]
|
||||
rpy_deg: [0, 0, 0]
|
||||
custom_pose:
|
||||
position: [0.30, -0.20, 0.30]
|
||||
rpy_deg: [0, 0, 0]
|
||||
grasp:
|
||||
approach_offset_m: 0.1
|
||||
pre_grasp_clearance_m: 0.05
|
||||
|
||||
@@ -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