host node add_resource_from_outer

fix cmake list
This commit is contained in:
wznln
2025-05-06 13:28:24 +08:00
parent 194985222e
commit b47f67d129
2 changed files with 35 additions and 2 deletions

View File

@@ -20,7 +20,40 @@ class Registry:
self.registry_paths = DEFAULT_PATHS.copy() # 使用copy避免修改默认值
if registry_paths:
self.registry_paths.extend(registry_paths)
self.device_type_registry = {}
action_type = self._replace_type_with_class(
"ResourceCreateFromOuter", "host_node", f"动作 add_resource_from_outer"
)
schema = ros_action_to_json_schema(action_type)
self.device_type_registry = {
"host_node": {
"description": "UniLabOS主机节点",
"class": {
"module": "unilabos.ros.nodes.presets.host_node",
"type": "python",
"status_types": {},
"action_value_mappings": {
"add_resource_from_outer": {
"type": msg_converter_manager.search_class("ResourceCreateFromOuter"),
"goal": {
"resources": "resources",
"device_ids": "device_ids",
},
"feedback": {},
"result": {
"success": "success"
},
"schema": schema
}
}
},
"schema": {
"properties": {},
"additionalProperties": False,
"type": "object"
},
"file_path": "/"
}
}
self.resource_type_registry = {}
self._setup_called = False # 跟踪setup是否已调用
# 其他状态变量

View File

@@ -55,7 +55,7 @@ set(action_files
"action/EmptyIn.action"
"action/FloatSingleInput.action"
"action/IntSingleInput.action"
"action/IntSingleOutput.action"
"action/StrSingleInput.action"
"action/Point3DSeparateInput.action"
"action/ResourceCreateFromOuter.action"