feat: wire Sam21Client into _deps and config
Adds services.sam21 (base_url + timeout_s) and grasp.use_sam21 toggle. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0bc1e02f11
commit
748f5f58f7
3 files changed
+17
-2
No files matched your search
@@ -6,7 +6,7 @@ from __future__ import annotations
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from ..clients import G1Client, MarkerClient, NuwaClient, YoloClient
|
||||
from ..clients import G1Client, MarkerClient, NuwaClient, Sam21Client, YoloClient
|
||||
from ..config import data_dir, get_config
|
||||
|
||||
|
||||
@@ -29,6 +29,14 @@ def yolo() -> YoloClient:
|
||||
return YoloClient(c["base_url"], timeout_s=c.get("timeout_s", 10.0))
|
||||
|
||||
|
||||
def sam21() -> Sam21Client:
|
||||
c = _svc(get_config(), "sam21")
|
||||
return Sam21Client(
|
||||
base_url=c.get("base_url", "http://localhost:8002"),
|
||||
timeout_s=float(c.get("timeout_s", 10.0)),
|
||||
)
|
||||
|
||||
|
||||
def active_robot_key() -> str:
|
||||
"""Which robot the orchestrator is currently bound to ('g1' or 'h1').
|
||||
Read from `robot.active` in config; defaults to 'g1' for backward compat."""
|
||||
|
||||
Reference in new issue
Block a user