Merge branch 'main' into 24-high-level-liquidhandler

This commit is contained in:
Xuwznln
2025-05-16 19:44:53 +08:00
committed by GitHub
6 changed files with 46 additions and 6 deletions

View File

@@ -12,7 +12,7 @@ separator.homemade:
goal:
stir_time: stir_time,
stir_speed: stir_speed
settling_time": settling_time
settling_time: settling_time
feedback:
status: status
result:

View File

@@ -3,6 +3,25 @@ vacuum_pump.mock:
class:
module: unilabos.devices.pump_and_valve.vacuum_pump_mock:VacuumPumpMock
type: python
status_types:
status: String
action_value_mappings:
open:
type: EmptyIn
goal: {}
feedback: {}
result: {}
close:
type: EmptyIn
goal: {}
feedback: {}
result: {}
set_status:
type: StrSingleInput
goal:
string: string
feedback: {}
result: {}
gas_source.mock:
description: Mock gas source

View File

@@ -188,8 +188,13 @@ class Registry:
action_config["type"] = self._replace_type_with_class(
action_config["type"], device_id, f"动作 {action_name}"
)
action_config["goal_default"] = yaml.safe_load(io.StringIO(get_yaml_from_goal_type(action_config["type"].Goal)))
action_config["schema"] = ros_action_to_json_schema(action_config["type"])
if action_config["type"] is not None:
action_config["goal_default"] = yaml.safe_load(io.StringIO(get_yaml_from_goal_type(action_config["type"].Goal)))
action_config["schema"] = ros_action_to_json_schema(action_config["type"])
else:
logger.warning(
f"[UniLab Registry] 设备 {device_id} 的动作 {action_name} 类型为空,跳过替换"
)
self.device_type_registry.update(data)