mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-14 13:14:39 +00:00
* Fix ResourceTreeSet load error * Raise error when using unsupported type to create ResourceTreeSet * Fix children key error * Fix children key error * Fix workstation resource not tracking * Fix workstation deck & children resource dupe * Fix workstation deck & children resource dupe * Fix multiple resource error * Fix resource tree update * Fix resource tree update * Force confirm uuid * Tip more error log * Refactor Bioyond workstation and experiment workflow (#105) Refactored the Bioyond workstation classes to improve parameter handling and workflow management. Updated experiment.py to use BioyondReactionStation with deck and material mappings, and enhanced workflow step parameter mapping and execution logic. Adjusted JSON experiment configs, improved workflow sequence handling, and added UUID assignment to PLR materials. Removed unused station_config and material cache logic, and added detailed docstrings and debug output for workflow methods. * Fix resource get. Fix resource parent not found. Mapping uuid for all resources. * mount parent uuid * Add logging configuration based on BasicConfig in main function * fix workstation node error * fix workstation node error * Update boot example * temp fix for resource get * temp fix for resource get * provide error info when cant find plr type * pack repo info * fix to plr type error * fix to plr type error * Update regular container method * support no size init * fix comprehensive_station.json * fix comprehensive_station.json * fix type conversion * fix state loading for regular container * Update deploy-docs.yml * Update deploy-docs.yml --------- Co-authored-by: ZiWei <131428629+ZiWei09@users.noreply.github.com>
2.9 KiB
2.9 KiB
有机常量合成样例
本样例演示如何配置和操作有机常量合成工作站,实现抽真空和充气等基本操作。
准备工作
设备配置文件
有机常量合成工作站的完整配置可在 test/experiments/mock_reactor.json 文件中找到。该配置文件采用平展结构,通过 type 字段区分物料和设备,并通过 parent 和 children 字段实现层级关系。
配置文件示例片段:
{
"nodes": [
{
"id": "ReactorX",
"children": [
"reactor",
"vacuum_valve",
"gas_valve",
"vacuum_pump",
"gas_source"
],
"parent": null,
"type": "device",
"class": "workstation"
},
{
"id": "reactor",
"parent": "ReactorX",
"type": "container"
},
{
"id": "vacuum_valve",
"parent": "ReactorX",
"type": "device"
},
{
"id": "gas_valve",
"parent": "ReactorX",
"type": "device"
},
{
"id": "vacuum_pump",
"parent": "ReactorX",
"type": "device"
},
{
"id": "gas_source",
"parent": "ReactorX",
"type": "device"
}
],
"links": [
{
"source": "reactor",
"target": "vacuum_valve"
},
{
"source": "reactor",
"target": "gas_valve"
},
{
"source": "vacuum_pump",
"target": "vacuum_valve"
},
{
"source": "gas_source",
"target": "gas_valve"
}
]
}
配置文件定义了反应系统的组成部分,主要包括:
- 反应工作站 (ReactorX) - 整个系统的父节点,包含所有子组件
- 反应器 (reactor) - 实际进行反应的容器
- 真空阀 (vacuum_valve) - 连接反应器和真空泵
- 气体阀 (gas_valve) - 连接反应器和气源
- 真空泵 (vacuum_pump) - 用于抽真空
- 气源 (gas_source) - 提供充气
这些组件通过链接关系形成一个完整的气路系统,可以实现抽真空和充气的功能。
启动方法
1. 启动反应器节点
使用以下命令启动模拟反应器:
unilab -g test/experiments/mock_reactor.json
2. 执行抽真空和充气操作
启动后,您可以使用以下命令执行抽真空操作:
ros2 action send_goal /devices/ReactorX/EvacuateAndRefillProtocol unilabos_msgs/action/EvacuateAndRefill "{vessel: reactor, gas: N2, repeats: 2}"
此命令会通过ros通信触发工作站执行抽真空和充气的协议操作,与此同时,您可以通过 http://localhost:8002/status 在主机节点信息-设备状态查看该操作对设备开关的实时效果。