From 337789e270555bf838adc7fc59fc20e402557f2e Mon Sep 17 00:00:00 2001 From: Xuwznln <18435084+Xuwznln@users.noreply.github.com> Date: Wed, 4 Feb 2026 19:46:12 +0800 Subject: [PATCH] add sample_material --- unilabos/app/model.py | 1 + unilabos/app/ws_client.py | 1 + unilabos/ros/nodes/presets/host_node.py | 1 + 3 files changed, 3 insertions(+) diff --git a/unilabos/app/model.py b/unilabos/app/model.py index 6f40e73..678fe32 100644 --- a/unilabos/app/model.py +++ b/unilabos/app/model.py @@ -54,6 +54,7 @@ class JobAddReq(BaseModel): action_type: str = Field( examples=["unilabos_msgs.action._str_single_input.StrSingleInput"], description="action type", default="" ) + sample_material: dict = Field(examples=[{"string": "string"}], description="sample uuid to material uuid", default_factory=dict) action_args: dict = Field(examples=[{"string": "string"}], description="action arguments", default_factory=dict) task_id: str = Field(examples=["task_id"], description="task uuid (auto-generated if empty)", default="") job_id: str = Field(examples=["job_id"], description="goal uuid (auto-generated if empty)", default="") diff --git a/unilabos/app/ws_client.py b/unilabos/app/ws_client.py index 8644353..448ab6c 100644 --- a/unilabos/app/ws_client.py +++ b/unilabos/app/ws_client.py @@ -688,6 +688,7 @@ class MessageProcessor: queue_item, action_type=req.action_type, action_kwargs=req.action_args, + sample_material=req.sample_material, server_info=req.server_info, ) diff --git a/unilabos/ros/nodes/presets/host_node.py b/unilabos/ros/nodes/presets/host_node.py index 64e5104..09a754c 100644 --- a/unilabos/ros/nodes/presets/host_node.py +++ b/unilabos/ros/nodes/presets/host_node.py @@ -758,6 +758,7 @@ class HostNode(BaseROS2DeviceNode): item: "QueueItem", action_type: str, action_kwargs: Dict[str, Any], + sample_material: Dict[str, str], server_info: Optional[Dict[str, Any]] = None, ) -> None: """