mirror of
https://github.com/deepmodeling/Uni-Lab-OS
synced 2026-03-27 14:54:35 +00:00
stripe ros2 schema desc
add create-device-skill
This commit is contained in:
@@ -866,68 +866,40 @@ liquid_handler:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
category:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2D2A0>
|
||||
type: string
|
||||
children:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedSequence
|
||||
object at 0x0000025304D12EC0>
|
||||
items:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2C320>
|
||||
type: string
|
||||
type: array
|
||||
config:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2D2C0>
|
||||
type: string
|
||||
data:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2D2E0>
|
||||
type: string
|
||||
id:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2D280>
|
||||
type: string
|
||||
name:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2D240>
|
||||
type: string
|
||||
parent:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2CF80>
|
||||
type: string
|
||||
pose:
|
||||
additionalProperties: false
|
||||
description: Field of type <rosidl_parser.definition.NamespacedType
|
||||
object at 0x0000025304D12EF0>
|
||||
properties:
|
||||
orientation:
|
||||
additionalProperties: false
|
||||
description: Field of type <rosidl_parser.definition.NamespacedType
|
||||
object at 0x000002530511A080>
|
||||
properties:
|
||||
w:
|
||||
description: Field of type <rosidl_parser.definition.BasicType
|
||||
object at 0x0000025305138C70>
|
||||
maximum: 1.7976931348623157e+308
|
||||
minimum: -1.7976931348623157e+308
|
||||
type: number
|
||||
x:
|
||||
description: Field of type <rosidl_parser.definition.BasicType
|
||||
object at 0x0000025305138BE0>
|
||||
maximum: 1.7976931348623157e+308
|
||||
minimum: -1.7976931348623157e+308
|
||||
type: number
|
||||
y:
|
||||
description: Field of type <rosidl_parser.definition.BasicType
|
||||
object at 0x0000025305138C10>
|
||||
maximum: 1.7976931348623157e+308
|
||||
minimum: -1.7976931348623157e+308
|
||||
type: number
|
||||
z:
|
||||
description: Field of type <rosidl_parser.definition.BasicType
|
||||
object at 0x0000025305138C40>
|
||||
maximum: 1.7976931348623157e+308
|
||||
minimum: -1.7976931348623157e+308
|
||||
type: number
|
||||
@@ -940,24 +912,16 @@ liquid_handler:
|
||||
type: object
|
||||
position:
|
||||
additionalProperties: false
|
||||
description: Field of type <rosidl_parser.definition.NamespacedType
|
||||
object at 0x000002530511A050>
|
||||
properties:
|
||||
x:
|
||||
description: Field of type <rosidl_parser.definition.BasicType
|
||||
object at 0x00000253050E7FD0>
|
||||
maximum: 1.7976931348623157e+308
|
||||
minimum: -1.7976931348623157e+308
|
||||
type: number
|
||||
y:
|
||||
description: Field of type <rosidl_parser.definition.BasicType
|
||||
object at 0x0000025305118040>
|
||||
maximum: 1.7976931348623157e+308
|
||||
minimum: -1.7976931348623157e+308
|
||||
type: number
|
||||
z:
|
||||
description: Field of type <rosidl_parser.definition.BasicType
|
||||
object at 0x0000025305118070>
|
||||
maximum: 1.7976931348623157e+308
|
||||
minimum: -1.7976931348623157e+308
|
||||
type: number
|
||||
@@ -973,12 +937,8 @@ liquid_handler:
|
||||
title: pose
|
||||
type: object
|
||||
sample_id:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2D220>
|
||||
type: string
|
||||
type:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2CE20>
|
||||
type: string
|
||||
title: plate
|
||||
type: object
|
||||
@@ -9300,68 +9260,40 @@ liquid_handler.prcxi:
|
||||
additionalProperties: false
|
||||
properties:
|
||||
category:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2D2A0>
|
||||
type: string
|
||||
children:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedSequence
|
||||
object at 0x0000025304D12EC0>
|
||||
items:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2C320>
|
||||
type: string
|
||||
type: array
|
||||
config:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2D2C0>
|
||||
type: string
|
||||
data:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2D2E0>
|
||||
type: string
|
||||
id:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2D280>
|
||||
type: string
|
||||
name:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2D240>
|
||||
type: string
|
||||
parent:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2CF80>
|
||||
type: string
|
||||
pose:
|
||||
additionalProperties: false
|
||||
description: Field of type <rosidl_parser.definition.NamespacedType
|
||||
object at 0x0000025304D12EF0>
|
||||
properties:
|
||||
orientation:
|
||||
additionalProperties: false
|
||||
description: Field of type <rosidl_parser.definition.NamespacedType
|
||||
object at 0x000002530511A080>
|
||||
properties:
|
||||
w:
|
||||
description: Field of type <rosidl_parser.definition.BasicType
|
||||
object at 0x0000025305138C70>
|
||||
maximum: 1.7976931348623157e+308
|
||||
minimum: -1.7976931348623157e+308
|
||||
type: number
|
||||
x:
|
||||
description: Field of type <rosidl_parser.definition.BasicType
|
||||
object at 0x0000025305138BE0>
|
||||
maximum: 1.7976931348623157e+308
|
||||
minimum: -1.7976931348623157e+308
|
||||
type: number
|
||||
y:
|
||||
description: Field of type <rosidl_parser.definition.BasicType
|
||||
object at 0x0000025305138C10>
|
||||
maximum: 1.7976931348623157e+308
|
||||
minimum: -1.7976931348623157e+308
|
||||
type: number
|
||||
z:
|
||||
description: Field of type <rosidl_parser.definition.BasicType
|
||||
object at 0x0000025305138C40>
|
||||
maximum: 1.7976931348623157e+308
|
||||
minimum: -1.7976931348623157e+308
|
||||
type: number
|
||||
@@ -9374,24 +9306,16 @@ liquid_handler.prcxi:
|
||||
type: object
|
||||
position:
|
||||
additionalProperties: false
|
||||
description: Field of type <rosidl_parser.definition.NamespacedType
|
||||
object at 0x000002530511A050>
|
||||
properties:
|
||||
x:
|
||||
description: Field of type <rosidl_parser.definition.BasicType
|
||||
object at 0x00000253050E7FD0>
|
||||
maximum: 1.7976931348623157e+308
|
||||
minimum: -1.7976931348623157e+308
|
||||
type: number
|
||||
y:
|
||||
description: Field of type <rosidl_parser.definition.BasicType
|
||||
object at 0x0000025305118040>
|
||||
maximum: 1.7976931348623157e+308
|
||||
minimum: -1.7976931348623157e+308
|
||||
type: number
|
||||
z:
|
||||
description: Field of type <rosidl_parser.definition.BasicType
|
||||
object at 0x0000025305118070>
|
||||
maximum: 1.7976931348623157e+308
|
||||
minimum: -1.7976931348623157e+308
|
||||
type: number
|
||||
@@ -9407,12 +9331,8 @@ liquid_handler.prcxi:
|
||||
title: pose
|
||||
type: object
|
||||
sample_id:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2D220>
|
||||
type: string
|
||||
type:
|
||||
description: Field of type <rosidl_parser.definition.UnboundedString
|
||||
object at 0x0000025304D2CE20>
|
||||
type: string
|
||||
title: plate
|
||||
type: object
|
||||
|
||||
@@ -47,7 +47,6 @@ from unilabos.registry.utils import (
|
||||
normalize_ast_action_handles,
|
||||
wrap_action_schema,
|
||||
preserve_field_descriptions,
|
||||
strip_ros_descriptions,
|
||||
resolve_method_params_via_import,
|
||||
SIMPLE_TYPE_MAP,
|
||||
)
|
||||
@@ -501,12 +500,17 @@ class Registry:
|
||||
json_type = SIMPLE_TYPE_MAP.get(param_type.lower())
|
||||
if json_type:
|
||||
prop_schema["type"] = json_type
|
||||
elif ":" in param_type:
|
||||
type_obj = resolve_type_object(param_type)
|
||||
if type_obj is not None:
|
||||
prop_schema = type_to_schema(type_obj)
|
||||
else:
|
||||
prop_schema["type"] = "object"
|
||||
elif import_map and param_type in import_map:
|
||||
type_obj = resolve_type_object(import_map[param_type])
|
||||
if type_obj is not None:
|
||||
prop_schema = type_to_schema(type_obj)
|
||||
else:
|
||||
# 无法 import 的自定义类型,默认当 object 处理(与 YAML runtime 路径一致)
|
||||
prop_schema["type"] = "object"
|
||||
else:
|
||||
json_type = get_json_schema_type(param_type)
|
||||
@@ -914,7 +918,6 @@ class Registry:
|
||||
logger.debug(f"[AST] device action '{action_name}': Result enrichment failed: {e}")
|
||||
try:
|
||||
schema = ros_action_to_json_schema(action_type_obj)
|
||||
strip_ros_descriptions(schema)
|
||||
except Exception:
|
||||
pass
|
||||
# 直接从 ROS2 Goal 实例获取默认值 (msgcenterpy)
|
||||
@@ -1826,7 +1829,6 @@ class Registry:
|
||||
pass
|
||||
try:
|
||||
entry_schema = ros_action_to_json_schema(action_type_obj)
|
||||
strip_ros_descriptions(entry_schema)
|
||||
if old_schema:
|
||||
preserve_field_descriptions(entry_schema, old_schema)
|
||||
if "description" in old_schema:
|
||||
@@ -1914,7 +1916,6 @@ class Registry:
|
||||
action_config["goal_default"] = {}
|
||||
prev_schema = action_config.get("schema", {})
|
||||
action_config["schema"] = ros_action_to_json_schema(target_type)
|
||||
strip_ros_descriptions(action_config["schema"])
|
||||
if prev_schema:
|
||||
preserve_field_descriptions(action_config["schema"], prev_schema)
|
||||
if "description" in prev_schema:
|
||||
|
||||
Reference in New Issue
Block a user