fix resource_get in action

This commit is contained in:
Junhan Chang
2025-10-17 11:18:47 +08:00
parent 30037a077a
commit 41390fbef9
3 changed files with 9 additions and 3 deletions

View File

@@ -232,8 +232,9 @@ class ROS2WorkstationNode(BaseROS2DeviceNode):
resource_id = (
protocol_kwargs[k]["id"] if v == "unilabos_msgs/Resource" else protocol_kwargs[k][0]["id"]
)
resource_uuid = protocol_kwargs[k].get("uuid", None)
r = SerialCommand_Request()
r.command = json.dumps({"id": resource_id, "with_children": True})
r.command = json.dumps({"id": resource_id, "uuid": resource_uuid, "with_children": True})
# 发送请求并等待响应
response: SerialCommand_Response = await self._resource_clients[
"resource_get"