mirror of
https://github.com/deepmodeling/Uni-Lab-OS
synced 2026-03-24 05:48:20 +00:00
minor fix on skill & registry
This commit is contained in:
@@ -182,11 +182,12 @@ API 模板结构:
|
|||||||
- ak/sk → AUTH, --addr → BASE URL
|
- ak/sk → AUTH, --addr → BASE URL
|
||||||
|
|
||||||
## Session State
|
## Session State
|
||||||
- lab_uuid, device_name
|
- lab_uuid(通过 API #1 自动匹配,不要问用户), device_name
|
||||||
|
|
||||||
## API Endpoints (10 个)
|
## API Endpoints (10 个)
|
||||||
# 注意:
|
# 注意:
|
||||||
# - #1 获取 lab 列表需加 ?page=1&page_size=100
|
# - #1 获取 lab 列表 + 自动匹配 lab_uuid(遍历 is_admin 的 lab,
|
||||||
|
# 调用 /lab/info/{uuid} 比对 access_key == ak)
|
||||||
# - #2 创建工作流用 POST /lab/workflow
|
# - #2 创建工作流用 POST /lab/workflow
|
||||||
# - #10 获取资源树路径含 lab_uuid: /lab/material/download/{lab_uuid}
|
# - #10 获取资源树路径含 lab_uuid: /lab/material/download/{lab_uuid}
|
||||||
|
|
||||||
|
|||||||
@@ -181,21 +181,6 @@ class Registry:
|
|||||||
"module": "unilabos.ros.nodes.presets.host_node:HostNode",
|
"module": "unilabos.ros.nodes.presets.host_node:HostNode",
|
||||||
"status_types": {},
|
"status_types": {},
|
||||||
"action_value_mappings": {
|
"action_value_mappings": {
|
||||||
"create_resource_detailed": {
|
|
||||||
"type": ResourceCreateFromOuter,
|
|
||||||
"goal": {
|
|
||||||
"resources": "resources",
|
|
||||||
"device_ids": "device_ids",
|
|
||||||
"bind_parent_ids": "bind_parent_ids",
|
|
||||||
"bind_locations": "bind_locations",
|
|
||||||
"other_calling_params": "other_calling_params",
|
|
||||||
},
|
|
||||||
"feedback": {},
|
|
||||||
"result": {"success": "success"},
|
|
||||||
"schema": ros_action_to_json_schema(ResourceCreateFromOuter),
|
|
||||||
"goal_default": ROS2MessageInstance(ResourceCreateFromOuter.Goal()).get_python_dict(),
|
|
||||||
"handles": {},
|
|
||||||
},
|
|
||||||
"create_resource": {
|
"create_resource": {
|
||||||
"type": ResourceCreateFromOuterEasy,
|
"type": ResourceCreateFromOuterEasy,
|
||||||
"goal": {
|
"goal": {
|
||||||
@@ -713,7 +698,7 @@ class Registry:
|
|||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
|
|
||||||
def _add_builtin_actions(self, device_config: Dict[str, Any], device_id: str):
|
def _add_builtin_actions(self, device_config: Dict[str, Any], device_id: str):
|
||||||
"""为设备添加内置的驱动命令动作"""
|
"""为设备添加内置的驱动命令动作(运行时需要,上报注册表时会过滤掉)"""
|
||||||
str_single_input = self._replace_type_with_class("StrSingleInput", device_id, "内置动作")
|
str_single_input = self._replace_type_with_class("StrSingleInput", device_id, "内置动作")
|
||||||
for additional_action in ["_execute_driver_command", "_execute_driver_command_async"]:
|
for additional_action in ["_execute_driver_command", "_execute_driver_command_async"]:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user