Initial commit

This commit is contained in:
Junhan Chang
2025-04-17 15:19:47 +08:00
parent a47a3f5c3a
commit c78ac482d8
262 changed files with 39871 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
# 启动样例
本章节提供了几个典型的启动样例,帮助您快速了解和使用系统。每个样例都包含了详细的配置说明、文件解读以及操作步骤,便于您参考和实践。
```{toctree}
:maxdepth: 1
liquid_handler.md
organic_synthesis.md
```

View File

@@ -0,0 +1,100 @@
# 移液站样例
本样例介绍如何配置和启动移液站设备,并执行基本操作如插入枪头等。
## 准备工作
### 设备配置文件
移液站设备的完整配置可在 `test/experiments/plr_test.json` 文件中找到。该配置文件采用平展结构,通过 `type` 字段区分物料和设备,并通过 `parent``children` 字段实现层级关系。
配置文件示例片段:
```json
{
"nodes": [
{
"id": "PLR_STATION",
"name": "PLR_LH_TEST",
"parent": null,
"type": "device",
"class": "liquid_handler",
"config": {},
"data": {},
"children": [
"deck"
]
},
{
"id": "deck",
"name": "deck",
"type": "container",
"class": null,
"parent": "PLR_STATION",
"children": [
"trash",
"trash_core96",
"teaching_carrier",
"tip_rack",
"plate"
]
}
],
"links": []
}
```
配置文件定义了移液站的组成部分,主要包括:
- 移液站本体LiquidHandler- 设备类型
- 移液站携带物料实例deck- 物料类型
## 启动方法
### 1. 启动移液站节点
使用以下命令启动移液站设备:
```bash
unilab -g test/experiments/plr_test.json --app_bridges ""
```
### 2. 执行枪头插入操作
启动后,您可以使用以下命令执行插入枪头操作:
```bash
ros2 action send_goal /devices/PLR_STATION/pick_up_tips unilabos_msgs/action/_liquid_handler_pick_up_tips/LiquidHandlerPickUpTips "{ tip_spots: [ { id: 'tip_rack_tipspot_0_0', name: 'tip_rack_tipspot_0_0', sample_id: null, children: [], parent: 'tip_rack', type: 'device', config: { position: { x: 7.2, y: 68.3, z: -83.5 }, size_x: 9.0, size_y: 9.0, size_z: 0, rotation: { x: 0, y: 0, z: 0, type: 'Rotation' }, category: 'tip_spot', model: null, type: 'TipSpot', prototype_tip: { type: 'HamiltonTip', total_tip_length: 95.1, has_filter: true, maximal_volume: 1065, pickup_method: 'OUT_OF_RACK', tip_size: 'HIGH_VOLUME' } }, data: { tip: { type: 'HamiltonTip', total_tip_length: 95.1, has_filter: true, maximal_volume: 1065, pickup_method: 'OUT_OF_RACK', tip_size: 'HIGH_VOLUME' }, tip_state: { liquids: [], pending_liquids: [], liquid_history: [] }, pending_tip: { type: 'HamiltonTip', total_tip_length: 95.1, has_filter: true, maximal_volume: 1065, pickup_method: 'OUT_OF_RACK', tip_size: 'HIGH_VOLUME' } } } ], use_channels: [ 0 ], offsets: [ { x: 0.0, y: 0.0, z: 0.0 } ] }"
```
此命令会通过ros通信触发移液站执行枪头插入操作得到如下的PyLabRobot的输出日志。
```log
Picking up tips:
pip# resource offset tip type max volume (µL) fitting depth (mm) tip length (mm) filter
p0: tip_rack_tipspot_0_0 0.0,0.0,0.0 HamiltonTip 1065 8 95.1 Yes
```
## 常见问题
1. **重复插入枪头不成功**操作编排应该符合实际操作顺序可自行通过PyLabRobot进行测试
## 移液站支持的操作
移液站支持多种操作,以下是当前系统支持的操作列表:
1. **LiquidHandlerAspirate** - 吸液操作
2. **LiquidHandlerDispense** - 排液操作
3. **LiquidHandlerDiscardTips** - 丢弃枪头
4. **LiquidHandlerDropTips** - 卸下枪头
5. **LiquidHandlerDropTips96** - 卸下96通道枪头
6. **LiquidHandlerMoveLid** - 移动盖子
7. **LiquidHandlerMovePlate** - 移动板子
8. **LiquidHandlerMoveResource** - 移动资源
9. **LiquidHandlerPickUpTips** - 插入枪头
10. **LiquidHandlerPickUpTips96** - 插入96通道枪头
11. **LiquidHandlerReturnTips** - 归还枪头
12. **LiquidHandlerReturnTips96** - 归还96通道枪头
13. **LiquidHandlerStamp** - 打印标记
14. **LiquidHandlerTransfer** - 液体转移
这些操作可通过ROS2 Action接口进行调用以实现复杂的移液流程。

View File

@@ -0,0 +1,105 @@
# 有机常量合成样例
本样例演示如何配置和操作有机常量合成工作站,实现抽真空和充气等基本操作。
## 准备工作
### 设备配置文件
有机常量合成工作站的完整配置可在 `test/experiments/mock_reactor.json` 文件中找到。该配置文件采用平展结构,通过 `type` 字段区分物料和设备,并通过 `parent``children` 字段实现层级关系。
配置文件示例片段:
```json
{
"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"
}
]
}
```
配置文件定义了反应系统的组成部分,主要包括:
1. **反应工作站 (ReactorX)** - 整个系统的父节点,包含所有子组件
2. **反应器 (reactor)** - 实际进行反应的容器
3. **真空阀 (vacuum_valve)** - 连接反应器和真空泵
4. **气体阀 (gas_valve)** - 连接反应器和气源
5. **真空泵 (vacuum_pump)** - 用于抽真空
6. **气源 (gas_source)** - 提供充气
这些组件通过链接关系形成一个完整的气路系统,可以实现抽真空和充气的功能。
## 启动方法
### 1. 启动反应器节点
使用以下命令启动模拟反应器:
```bash
unilab -g test/experiments/mock_reactor.json --app_bridges ""
```
### 2. 执行抽真空和充气操作
启动后,您可以使用以下命令执行抽真空操作:
```bash
ros2 action send_goal /devices/ReactorX/EvacuateAndRefillProtocol unilabos_msgs/action/EvacuateAndRefill "{vessel: reactor, gas: N2, repeats: 2}"
```
此命令会通过ros通信触发工作站执行抽真空和充气的协议操作与此同时您可以通过 http://localhost:8002/status 在`主机节点信息`-`设备状态`查看该操作对设备开关的实时效果。