Device Visualization & Mock Devices (#44) [37-biomek-i5i7 (#40), Device visualization (#39), Add Mock Device for Organic Synthesis\添加有机合成的虚拟仪器和Protocol (#43)]

* add biomek.py demo implementation

* 更新LiquidHandlerBiomek类,添加资源创建功能,优化协议创建方法,修复部分代码格式问题,更新YAML配置以支持新功能。

* Test

* fix biomek success type

* Convert LH action to biomek.

* Update biomek.py

* 注册表上报handle和schema (param input)

* 修复biomek缺少的字段

* delete 's'

* Remove warnings

* Update biomek.py

* Biomek test

* Update biomek.py

* 新增transfer_biomek的msg

* New transfer_biomek

* Updated transfer_biomek

* 更新transfer_biomek的msg

* 更新transfer_biomek的msg

* 支持Biomek创建

* new action

* fix key name typo

* New parameter for biomek to run.

* Refine

* Update

* new actions

* new actions

* 1

* registry

* fix biomek startup
add action handles

* fix handles not as default entry

* biomek_test.py

biomek_test.py是最新的版本,运行它会生成complete_biomek_protocol.json

* Update biomek.py

* biomek_test.py

* fix liquid_handler.biomek handles

* host node新增resource add时间统计
create_resource新增handle
bump version to 0.9.2

* 修正物料上传时间
改用biomek_test
增加ResultInfoEncoder
支持返回结果上传

* 正确发送return_info结果

* 同步执行状态信息

* 取消raiseValueError提示

* Update biomek_test.py

* 0608 DONE

* 同步了Biomek.py 现在应可用

* biomek switch back to non-test

* temp disable initialize resource

* 37-biomek-i5i7 (#40)

* add biomek.py demo implementation

* 更新LiquidHandlerBiomek类,添加资源创建功能,优化协议创建方法,修复部分代码格式问题,更新YAML配置以支持新功能。

* Test

* fix biomek success type

* Convert LH action to biomek.

* Update biomek.py

* 注册表上报handle和schema (param input)

* 修复biomek缺少的字段

* delete 's'

* Remove warnings

* Update biomek.py

* Biomek test

* Update biomek.py

* 新增transfer_biomek的msg

* New transfer_biomek

* Updated transfer_biomek

* 更新transfer_biomek的msg

* 更新transfer_biomek的msg

* 支持Biomek创建

* new action

* fix key name typo

* New parameter for biomek to run.

* Refine

* Update

* new actions

* new actions

* 1

* registry

* fix biomek startup
add action handles

* fix handles not as default entry

* biomek_test.py

biomek_test.py是最新的版本,运行它会生成complete_biomek_protocol.json

* Update biomek.py

* biomek_test.py

* fix liquid_handler.biomek handles

* host node新增resource add时间统计
create_resource新增handle
bump version to 0.9.2

* 修正物料上传时间
改用biomek_test
增加ResultInfoEncoder
支持返回结果上传

* 正确发送return_info结果

* 同步执行状态信息

* 取消raiseValueError提示

* Update biomek_test.py

* 0608 DONE

* 同步了Biomek.py 现在应可用

* biomek switch back to non-test

* temp disable initialize resource

* Refine biomek

* Refine copy issue

* Refine

---------

Co-authored-by: Junhan Chang <changjh@pku.edu.cn>
Co-authored-by: Guangxin Zhang <guangxin.zhang.bio@gmail.com>
Co-authored-by: qxw138 <qxw@stu.pku.edu.cn>

* Device visualization (#39)

* Update README and MQTTClient for installation instructions and code improvements

* feat: 支持local_config启动
add: 增加对crt path的说明,为传入config.py的相对路径
move: web component

* add: registry description

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* feat: node_info_update srv
fix: OTDeck cant create

* close #12
feat: slave node registry

* feat: show machine name
fix: host node registry not uploaded

* feat: add hplc registry

* feat: add hplc registry

* fix: hplc status typo

* fix: devices/

* 完成启动OT并联动rviz

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* fix: device.class possible null

* fix: HPLC additions with online service

* fix: slave mode spin not working

* fix: slave mode spin not working

* 修复rviz位置问题,

修复rviz位置问题,
在无tf变动时减缓发送频率
在backend中添加物料跟随方法

* feat: 多ProtocolNode 允许子设备ID相同
feat: 上报发现的ActionClient
feat: Host重启动,通过discover机制要求slaveNode重新注册,实现信息及时上报

* feat: 支持env设置config

* fix: running logic

* fix: running logic

* fix: missing ot

* 在main中直接初始化republisher和物料的mesh节点

* 将joint_republisher和resource_mesh_manager添加进 main_slave_run.py中

* Device visualization (#14)

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* 修复rviz位置问题,

修复rviz位置问题,
在无tf变动时减缓发送频率
在backend中添加物料跟随方法

* fix: running logic

* fix: running logic

* fix: missing ot

* 在main中直接初始化republisher和物料的mesh节点

* 将joint_republisher和resource_mesh_manager添加进 main_slave_run.py中

---------

Co-authored-by: zhangshixiang <@zhangshixiang>
Co-authored-by: wznln <18435084+Xuwznln@users.noreply.github.com>

* fix: missing hostname in devices_names
fix: upload_file for model file

* fix: missing paho-mqtt package
bump version to 0.9.0

* fix startup
add ResourceCreateFromOuter.action

* fix type hint

* update actions

* update actions

* host node add_resource_from_outer
fix cmake list

* pass device config to device class

* add: bind_parent_ids to resource create action
fix: message convert string

* fix: host node should not be re_discovered

* feat: resource tracker support dict

* feat: add more necessary params

* feat: fix boolean null in registry action data

* feat: add outer resource

* 编写mesh添加action

* feat: append resource

* add action

* feat: vis 2d for plr

* fix

* fix: browser on rviz

* fix: cloud bridge error fallback to local

* fix: salve auto run rviz

* 初始化两个plate

* Device visualization (#22)

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* 修复rviz位置问题,

修复rviz位置问题,
在无tf变动时减缓发送频率
在backend中添加物料跟随方法

* fix: running logic

* fix: running logic

* fix: missing ot

* 在main中直接初始化republisher和物料的mesh节点

* 将joint_republisher和resource_mesh_manager添加进 main_slave_run.py中

* 编写mesh添加action

* add action

* fix

* fix: browser on rviz

* fix: cloud bridge error fallback to local

* fix: salve auto run rviz

* 初始化两个plate

---------

Co-authored-by: zhangshixiang <@zhangshixiang>
Co-authored-by: wznln <18435084+Xuwznln@users.noreply.github.com>

* fix: multi channel

* fix: aspirate

* fix: aspirate

* fix: aspirate

* fix: aspirate

* 提交

* fix: jobadd

* fix: jobadd

* fix: msg converter

* tijiao

* add resource creat easy action

* identify debug msg

* mq client id

* 提取lh的joint发布

* unify liquid_handler definition

* 修改物料跟随与物料添加逻辑

修改物料跟随与物料添加逻辑
将joint_publisher类移出lh的backends,但仍需要对lh的backends进行一些改写

* Revert "修改物料跟随与物料添加逻辑"

This reverts commit 498c997ad7.

* Reapply "修改物料跟随与物料添加逻辑"

This reverts commit 3a60d2ae81.

* Revert "Merge remote-tracking branch 'upstream/dev' into device_visualization"

This reverts commit fa727220af, reversing
changes made to 498c997ad7.

* 修改物料放下时的方法,如果选择

修改物料放下时的方法,
如果选择drop_trash,则删除物料显示
如果选择drop,则让其解除连接

* add biomek.py demo implementation

* 更新LiquidHandlerBiomek类,添加资源创建功能,优化协议创建方法,修复部分代码格式问题,更新YAML配置以支持新功能。

* Test

* fix biomek success type

* Convert LH action to biomek.

* Update biomek.py

* 注册表上报handle和schema (param input)

* 修复biomek缺少的字段

* delete 's'

* Remove warnings

* Update biomek.py

* Biomek test

* Update biomek.py

* 新增transfer_biomek的msg

* New transfer_biomek

* Updated transfer_biomek

* 更新transfer_biomek的msg

* 更新transfer_biomek的msg

* 支持Biomek创建

* new action

* fix key name typo

* New parameter for biomek to run.

* Refine

* Update

* new actions

* new actions

* 1

* registry

* fix biomek startup
add action handles

* fix handles not as default entry

* unilab添加moveit启动

1,整合所有moveit节点到一个move_group中,并整合所有的controller依次激活
2,添加pymoveit2的节点,使用json可直接启动
3,修改机械臂规划方式,添加约束,让冗余关节不会进行过多移动

* biomek_test.py

biomek_test.py是最新的版本,运行它会生成complete_biomek_protocol.json

* Update biomek.py

* biomek_test.py

* fix liquid_handler.biomek handles

* 修改物体attach时,多次赋值当前时间导致卡顿问题,

* Revert "修改物体attach时,多次赋值当前时间导致卡顿问题,"

This reverts commit 56d45b94f5.

* Reapply "修改物体attach时,多次赋值当前时间导致卡顿问题,"

This reverts commit 07d9db20c3.

* 添加缺少物料:"plate_well_G12",

* host node新增resource add时间统计
create_resource新增handle
bump version to 0.9.2

* 修正物料上传时间
改用biomek_test
增加ResultInfoEncoder
支持返回结果上传

* 正确发送return_info结果

* 同步执行状态信息

* 取消raiseValueError提示

* Update biomek_test.py

* 0608 DONE

* 同步了Biomek.py 现在应可用

* biomek switch back to non-test

* temp disable initialize resource

* add

* fix tip resource data

* liquid states

* change to debug level

* Revert "change to debug level"

This reverts commit 5d9953c3e5.

* Reapply "change to debug level"

This reverts commit 2487bb6ffc.

* fix tip resource data

* add full device

* add moveit yaml

* 修复moveit
增加post_init阶段,给予ros_node反向

* remove necessary node

* fix moveit action client

* remove necessary imports

* Update moveit_interface.py

* fix handler_key uppercase

* json add liquids

* fix setup

* add

* change to "sources" and "targets" for lh

* bump version

* remove parent's parent link

---------

Co-authored-by: Harvey Que <Q-Query@outlook.com>
Co-authored-by: wznln <18435084+Xuwznln@users.noreply.github.com>
Co-authored-by: zhangshixiang <@zhangshixiang>
Co-authored-by: Junhan Chang <changjh@pku.edu.cn>
Co-authored-by: Guangxin Zhang <guangxin.zhang.bio@gmail.com>
Co-authored-by: qxw138 <qxw@stu.pku.edu.cn>

* Device visualization (#41)

* Update README and MQTTClient for installation instructions and code improvements

* feat: 支持local_config启动
add: 增加对crt path的说明,为传入config.py的相对路径
move: web component

* add: registry description

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* feat: node_info_update srv
fix: OTDeck cant create

* close #12
feat: slave node registry

* feat: show machine name
fix: host node registry not uploaded

* feat: add hplc registry

* feat: add hplc registry

* fix: hplc status typo

* fix: devices/

* 完成启动OT并联动rviz

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* fix: device.class possible null

* fix: HPLC additions with online service

* fix: slave mode spin not working

* fix: slave mode spin not working

* 修复rviz位置问题,

修复rviz位置问题,
在无tf变动时减缓发送频率
在backend中添加物料跟随方法

* feat: 多ProtocolNode 允许子设备ID相同
feat: 上报发现的ActionClient
feat: Host重启动,通过discover机制要求slaveNode重新注册,实现信息及时上报

* feat: 支持env设置config

* fix: running logic

* fix: running logic

* fix: missing ot

* 在main中直接初始化republisher和物料的mesh节点

* 将joint_republisher和resource_mesh_manager添加进 main_slave_run.py中

* Device visualization (#14)

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* 修复rviz位置问题,

修复rviz位置问题,
在无tf变动时减缓发送频率
在backend中添加物料跟随方法

* fix: running logic

* fix: running logic

* fix: missing ot

* 在main中直接初始化republisher和物料的mesh节点

* 将joint_republisher和resource_mesh_manager添加进 main_slave_run.py中

---------

Co-authored-by: zhangshixiang <@zhangshixiang>
Co-authored-by: wznln <18435084+Xuwznln@users.noreply.github.com>

* fix: missing hostname in devices_names
fix: upload_file for model file

* fix: missing paho-mqtt package
bump version to 0.9.0

* fix startup
add ResourceCreateFromOuter.action

* fix type hint

* update actions

* update actions

* host node add_resource_from_outer
fix cmake list

* pass device config to device class

* add: bind_parent_ids to resource create action
fix: message convert string

* fix: host node should not be re_discovered

* feat: resource tracker support dict

* feat: add more necessary params

* feat: fix boolean null in registry action data

* feat: add outer resource

* 编写mesh添加action

* feat: append resource

* add action

* feat: vis 2d for plr

* fix

* fix: browser on rviz

* fix: cloud bridge error fallback to local

* fix: salve auto run rviz

* 初始化两个plate

* Device visualization (#22)

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* 修复rviz位置问题,

修复rviz位置问题,
在无tf变动时减缓发送频率
在backend中添加物料跟随方法

* fix: running logic

* fix: running logic

* fix: missing ot

* 在main中直接初始化republisher和物料的mesh节点

* 将joint_republisher和resource_mesh_manager添加进 main_slave_run.py中

* 编写mesh添加action

* add action

* fix

* fix: browser on rviz

* fix: cloud bridge error fallback to local

* fix: salve auto run rviz

* 初始化两个plate

---------

Co-authored-by: zhangshixiang <@zhangshixiang>
Co-authored-by: wznln <18435084+Xuwznln@users.noreply.github.com>

* fix: multi channel

* fix: aspirate

* fix: aspirate

* fix: aspirate

* fix: aspirate

* 提交

* fix: jobadd

* fix: jobadd

* fix: msg converter

* tijiao

* add resource creat easy action

* identify debug msg

* mq client id

* 提取lh的joint发布

* unify liquid_handler definition

* 修改物料跟随与物料添加逻辑

修改物料跟随与物料添加逻辑
将joint_publisher类移出lh的backends,但仍需要对lh的backends进行一些改写

* Revert "修改物料跟随与物料添加逻辑"

This reverts commit 498c997ad7.

* Reapply "修改物料跟随与物料添加逻辑"

This reverts commit 3a60d2ae81.

* Revert "Merge remote-tracking branch 'upstream/dev' into device_visualization"

This reverts commit fa727220af, reversing
changes made to 498c997ad7.

* 修改物料放下时的方法,如果选择

修改物料放下时的方法,
如果选择drop_trash,则删除物料显示
如果选择drop,则让其解除连接

* add biomek.py demo implementation

* 更新LiquidHandlerBiomek类,添加资源创建功能,优化协议创建方法,修复部分代码格式问题,更新YAML配置以支持新功能。

* Test

* fix biomek success type

* Convert LH action to biomek.

* Update biomek.py

* 注册表上报handle和schema (param input)

* 修复biomek缺少的字段

* delete 's'

* Remove warnings

* Update biomek.py

* Biomek test

* Update biomek.py

* 新增transfer_biomek的msg

* New transfer_biomek

* Updated transfer_biomek

* 更新transfer_biomek的msg

* 更新transfer_biomek的msg

* 支持Biomek创建

* new action

* fix key name typo

* New parameter for biomek to run.

* Refine

* Update

* new actions

* new actions

* 1

* registry

* fix biomek startup
add action handles

* fix handles not as default entry

* unilab添加moveit启动

1,整合所有moveit节点到一个move_group中,并整合所有的controller依次激活
2,添加pymoveit2的节点,使用json可直接启动
3,修改机械臂规划方式,添加约束,让冗余关节不会进行过多移动

* biomek_test.py

biomek_test.py是最新的版本,运行它会生成complete_biomek_protocol.json

* Update biomek.py

* biomek_test.py

* fix liquid_handler.biomek handles

* 修改物体attach时,多次赋值当前时间导致卡顿问题,

* Revert "修改物体attach时,多次赋值当前时间导致卡顿问题,"

This reverts commit 56d45b94f5.

* Reapply "修改物体attach时,多次赋值当前时间导致卡顿问题,"

This reverts commit 07d9db20c3.

* 添加缺少物料:"plate_well_G12",

* host node新增resource add时间统计
create_resource新增handle
bump version to 0.9.2

* 修正物料上传时间
改用biomek_test
增加ResultInfoEncoder
支持返回结果上传

* 正确发送return_info结果

* 同步执行状态信息

* 取消raiseValueError提示

* Update biomek_test.py

* 0608 DONE

* 同步了Biomek.py 现在应可用

* biomek switch back to non-test

* temp disable initialize resource

* add

* fix tip resource data

* liquid states

* change to debug level

* Revert "change to debug level"

This reverts commit 5d9953c3e5.

* Reapply "change to debug level"

This reverts commit 2487bb6ffc.

* fix tip resource data

* add full device

* add moveit yaml

* 修复moveit
增加post_init阶段,给予ros_node反向

* remove necessary node

* fix moveit action client

* remove necessary imports

* Update moveit_interface.py

* fix handler_key uppercase

* json add liquids

* fix setup

* add

* change to "sources" and "targets" for lh

* bump version

* remove parent's parent link

* change arm's name

* change name

---------

Co-authored-by: Harvey Que <Q-Query@outlook.com>
Co-authored-by: zhangshixiang <@zhangshixiang>
Co-authored-by: q434343 <73513873+q434343@users.noreply.github.com>
Co-authored-by: Junhan Chang <changjh@pku.edu.cn>
Co-authored-by: Guangxin Zhang <guangxin.zhang.bio@gmail.com>
Co-authored-by: qxw138 <qxw@stu.pku.edu.cn>

* fix move it

* fix move it

* create_resource

* bump ver
modify slot type

* 增加modbus支持
调整protocol node以更好支持多种类型的read和write

* 调整protocol node以更好支持多种类型的read和write

* 补充日志

* Device visualization (#42)

* Update README and MQTTClient for installation instructions and code improvements

* feat: 支持local_config启动
add: 增加对crt path的说明,为传入config.py的相对路径
move: web component

* add: registry description

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* feat: node_info_update srv
fix: OTDeck cant create

* close #12
feat: slave node registry

* feat: show machine name
fix: host node registry not uploaded

* feat: add hplc registry

* feat: add hplc registry

* fix: hplc status typo

* fix: devices/

* 完成启动OT并联动rviz

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* fix: device.class possible null

* fix: HPLC additions with online service

* fix: slave mode spin not working

* fix: slave mode spin not working

* 修复rviz位置问题,

修复rviz位置问题,
在无tf变动时减缓发送频率
在backend中添加物料跟随方法

* feat: 多ProtocolNode 允许子设备ID相同
feat: 上报发现的ActionClient
feat: Host重启动,通过discover机制要求slaveNode重新注册,实现信息及时上报

* feat: 支持env设置config

* fix: running logic

* fix: running logic

* fix: missing ot

* 在main中直接初始化republisher和物料的mesh节点

* 将joint_republisher和resource_mesh_manager添加进 main_slave_run.py中

* Device visualization (#14)

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* 修复rviz位置问题,

修复rviz位置问题,
在无tf变动时减缓发送频率
在backend中添加物料跟随方法

* fix: running logic

* fix: running logic

* fix: missing ot

* 在main中直接初始化republisher和物料的mesh节点

* 将joint_republisher和resource_mesh_manager添加进 main_slave_run.py中

---------

Co-authored-by: zhangshixiang <@zhangshixiang>
Co-authored-by: wznln <18435084+Xuwznln@users.noreply.github.com>

* fix: missing hostname in devices_names
fix: upload_file for model file

* fix: missing paho-mqtt package
bump version to 0.9.0

* fix startup
add ResourceCreateFromOuter.action

* fix type hint

* update actions

* update actions

* host node add_resource_from_outer
fix cmake list

* pass device config to device class

* add: bind_parent_ids to resource create action
fix: message convert string

* fix: host node should not be re_discovered

* feat: resource tracker support dict

* feat: add more necessary params

* feat: fix boolean null in registry action data

* feat: add outer resource

* 编写mesh添加action

* feat: append resource

* add action

* feat: vis 2d for plr

* fix

* fix: browser on rviz

* fix: cloud bridge error fallback to local

* fix: salve auto run rviz

* 初始化两个plate

* Device visualization (#22)

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* add 3d visualization

* 完成在main中启动设备可视化

完成在main中启动设备可视化,并输出物料ID:mesh的对应关系resource_model

添加物料模型管理类,遍历物料与resource_model,完成TF数据收集

* 完成TF发布

* 修改模型方向,在yaml中添加变换属性

* 添加物料tf变化时,发送topic到前端

另外修改了物料初始化的方法,防止在tf还未发布时提前建立物料模型与发布话题

* 添加关节发布节点与物料可视化节点进入unilab

* 使用json启动plr与3D模型仿真

* 完成启动OT并联动rviz

* 修复rviz位置问题,

修复rviz位置问题,
在无tf变动时减缓发送频率
在backend中添加物料跟随方法

* fix: running logic

* fix: running logic

* fix: missing ot

* 在main中直接初始化republisher和物料的mesh节点

* 将joint_republisher和resource_mesh_manager添加进 main_slave_run.py中

* 编写mesh添加action

* add action

* fix

* fix: browser on rviz

* fix: cloud bridge error fallback to local

* fix: salve auto run rviz

* 初始化两个plate

---------

Co-authored-by: zhangshixiang <@zhangshixiang>
Co-authored-by: wznln <18435084+Xuwznln@users.noreply.github.com>

* fix: multi channel

* fix: aspirate

* fix: aspirate

* fix: aspirate

* fix: aspirate

* 提交

* fix: jobadd

* fix: jobadd

* fix: msg converter

* tijiao

* add resource creat easy action

* identify debug msg

* mq client id

* 提取lh的joint发布

* unify liquid_handler definition

* 修改物料跟随与物料添加逻辑

修改物料跟随与物料添加逻辑
将joint_publisher类移出lh的backends,但仍需要对lh的backends进行一些改写

* Revert "修改物料跟随与物料添加逻辑"

This reverts commit 498c997ad7.

* Reapply "修改物料跟随与物料添加逻辑"

This reverts commit 3a60d2ae81.

* Revert "Merge remote-tracking branch 'upstream/dev' into device_visualization"

This reverts commit fa727220af, reversing
changes made to 498c997ad7.

* 修改物料放下时的方法,如果选择

修改物料放下时的方法,
如果选择drop_trash,则删除物料显示
如果选择drop,则让其解除连接

* unilab添加moveit启动

1,整合所有moveit节点到一个move_group中,并整合所有的controller依次激活
2,添加pymoveit2的节点,使用json可直接启动
3,修改机械臂规划方式,添加约束,让冗余关节不会进行过多移动

* 修改物体attach时,多次赋值当前时间导致卡顿问题,

* Revert "修改物体attach时,多次赋值当前时间导致卡顿问题,"

This reverts commit 56d45b94f5.

* Reapply "修改物体attach时,多次赋值当前时间导致卡顿问题,"

This reverts commit 07d9db20c3.

* 添加缺少物料:"plate_well_G12",

* add

* fix tip resource data

* liquid states

* change to debug level

* Revert "change to debug level"

This reverts commit 5d9953c3e5.

* Reapply "change to debug level"

This reverts commit 2487bb6ffc.

* fix tip resource data

* add full device

* add moveit yaml

* 修复moveit
增加post_init阶段,给予ros_node反向

* remove necessary node

* fix moveit action client

* remove necessary imports

* Update moveit_interface.py

* fix handler_key uppercase

* json add liquids

* fix setup

* add

* change to "sources" and "targets" for lh

* bump version

* remove parent's parent link

* change arm's name

* change name

* fix ik error

---------

Co-authored-by: Harvey Que <Q-Query@outlook.com>
Co-authored-by: zhangshixiang <@zhangshixiang>
Co-authored-by: q434343 <73513873+q434343@users.noreply.github.com>
Co-authored-by: Junhan Chang <changjh@pku.edu.cn>

* Add Mock Device for Organic Synthesis\添加有机合成的虚拟仪器和Protocol (#43)

* Add Device MockChiller

Add device MockChiller

* Add Device MockFilter

* Add Device MockPump

* Add Device MockRotavap

* Add Device MockSeparator

* Add Device MockStirrer

* Add Device MockHeater

* Add Device MockVacuum

* Add Device MockSolenoidValve

* Add Device Mock \_init_.py

* 规范模拟设备代码与注册表信息

* 更改Mock大写文件夹名

* 删除大写目录

* Edited Mock device json

* Match mock device with action

* Edit mock device yaml

* Add new action

* Add Virtual Device, Action, YAML, Protocol for Organic Syn

* 单独分类测试的protocol文件夹

* 更名Action

---------

Co-authored-by: Xuwznln <18435084+Xuwznln@users.noreply.github.com>

---------

Co-authored-by: Junhan Chang <changjh@pku.edu.cn>
Co-authored-by: Guangxin Zhang <guangxin.zhang.bio@gmail.com>
Co-authored-by: qxw138 <qxw@stu.pku.edu.cn>
Co-authored-by: q434343 <73513873+q434343@users.noreply.github.com>
Co-authored-by: Harvey Que <Q-Query@outlook.com>
Co-authored-by: Kongchang Feng <2100011801@stu.pku.edu.cn>
This commit is contained in:
Xuwznln
2025-06-12 21:01:04 +08:00
committed by GitHub
parent 3470a1cb69
commit aa1c67de29
264 changed files with 48914 additions and 2955 deletions

View File

@@ -5,6 +5,6 @@ io_snrd:
type: python
hardware_interface:
name: modbus_client
extra_info: address
extra_info: []
read: read_io_coil
write: write_io_coil

View File

@@ -0,0 +1,9 @@
hotel.thermo_orbitor_rs2_hotel:
description: Thermo Orbitor RS2 Hotel
class:
module: unilabos.devices.resource_container.container:HotelContainer
type: python
model:
type: device
mesh: thermo_orbitor_rs2_hotel

View File

@@ -1,5 +1,6 @@
liquid_handler:
description: Liquid handler device controlled by pylabrobot
icon: icon_yiyezhan.webp
class:
module: unilabos.devices.liquid_handling.liquid_handler_abstract:LiquidHandlerAbstract
type: python
@@ -22,8 +23,8 @@ liquid_handler:
is_96_well: is_96_well
top: top
none_keys: none_keys
feedback: { }
result: { }
feedback: {}
result: {}
add_liquid:
type: LiquidHandlerAdd
goal:
@@ -43,8 +44,8 @@ liquid_handler:
mix_rate: mix_rate
mix_liquid_height: mix_liquid_height
none_keys: none_keys
feedback: { }
result: { }
feedback: {}
result: {}
transfer_liquid:
type: LiquidHandlerTransfer
goal:
@@ -69,8 +70,8 @@ liquid_handler:
mix_liquid_height: mix_liquid_height
delays: delays
none_keys: none_keys
feedback: { }
result: { }
feedback: {}
result: {}
mix:
type: LiquidHandlerMix
goal:
@@ -81,16 +82,16 @@ liquid_handler:
offsets: offsets
mix_rate: mix_rate
none_keys: none_keys
feedback: { }
result: { }
feedback: {}
result: {}
move_to:
type: LiquidHandlerMoveTo
goal:
well: well
dis_to_top: dis_to_top
channel: channel
feedback: { }
result: { }
feedback: {}
result: {}
aspirate:
type: LiquidHandlerAspirate
goal:
@@ -245,6 +246,21 @@ liquid_handler:
target_vols: target_vols
aspiration_flow_rate: aspiration_flow_rate
dispense_flow_rates: dispense_flow_rates
handles:
input:
- handler_key: liquid-input
label: Liquid Input
data_type: resource
io_type: target
data_source: handle
data_key: liquid
output:
- handler_key: liquid-output
label: Liquid Output
data_type: resource
io_type: source
data_source: executor
data_key: liquid
schema:
type: object
properties:
@@ -272,3 +288,174 @@ liquid_handler.revvity:
status: status
result:
success: success
liquid_handler.biomek:
description: Biomek液体处理器设备基于pylabrobot控制
icon: icon_yiyezhan.webp
class:
module: unilabos.devices.liquid_handling.biomek:LiquidHandlerBiomek
type: python
status_types: {}
action_value_mappings:
create_protocol:
type: LiquidHandlerProtocolCreation
goal:
protocol_name: protocol_name
protocol_description: protocol_description
protocol_version: protocol_version
protocol_author: protocol_author
protocol_date: protocol_date
protocol_type: protocol_type
none_keys: none_keys
feedback: {}
result: {}
run_protocol:
type: EmptyIn
goal: {}
feedback: {}
result: {}
transfer_liquid:
type: LiquidHandlerTransfer
goal:
asp_vols: asp_vols
dis_vols: dis_vols
sources: sources
targets: targets
tip_racks: tip_racks
use_channels: use_channels
asp_flow_rates: asp_flow_rates
dis_flow_rates: dis_flow_rates
offsets: offsets
touch_tip: touch_tip
liquid_height: liquid_height
blow_out_air_volume: blow_out_air_volume
spread: spread
is_96_well: is_96_well
mix_stage: mix_stage
mix_times: mix_times
mix_vol: mix_vol
mix_rate: mix_rate
mix_liquid_height: mix_liquid_height
delays: delays
none_keys: none_keys
feedback: {}
result: {}
handles:
input:
- handler_key: liquid-input
label: Liquid Input
data_type: resource
io_type: target
data_source: handle
data_key: liquid
output:
- handler_key: liquid-output
label: Liquid Output
data_type: resource
io_type: source
data_source: executor
data_key: liquid
transfer_biomek:
type: LiquidHandlerTransferBiomek
goal:
sources: sources
targets: targets
tip_rack: tip_rack
volume: volume
aspirate_techniques: aspirate_techniques
dispense_techniques: dispense_techniques
feedback: {}
result: {}
handles:
input:
- handler_key: sources
label: sources
data_type: resource
data_source: handle
data_key: liquid
- handler_key: targets
label: targets
data_type: resource
data_source: executor
data_key: liquid
- handler_key: tip_rack
label: tip_rack
data_type: resource
data_source: executor
data_key: liquid
output:
- handler_key: sources_out
label: sources
data_type: resource
data_source: handle
data_key: liquid
- handler_key: targets_out
label: targets
data_type: resource
data_source: executor
data_key: liquid
oscillation_biomek:
type: LiquidHandlerOscillateBiomek
goal:
rpm: rpm
time: time
feedback: {}
result: {}
handles:
input:
- handler_key: plate
label: plate
data_type: resource
data_source: handle
data_key: liquid
output:
- handler_key: plate_out
label: plate
data_type: resource
data_source: handle
data_key: liquid
move_biomek:
type: LiquidHandlerMoveBiomek
goal:
source: sources
target: targets
feedback: {}
result:
name: name
handles:
input:
- handler_key: sources
label: sources
data_type: resource
data_source: handle
data_key: liquid
output:
- handler_key: targets
label: targets
data_type: resource
data_source: handle
data_key: liquid
incubation_biomek:
type: LiquidHandlerIncubateBiomek
goal:
time: time
feedback: {}
result: {}
handles:
input:
- handler_key: plate
label: plate
data_type: resource
data_source: handle
data_key: liquid
output:
- handler_key: plate_out
label: plate
data_type: resource
data_source: handle
data_key: liquid
schema:
type: object
properties: {}
required: []
additionalProperties: false

View File

@@ -0,0 +1,892 @@
mock_chiller:
description: Mock Chiller Device
class:
module: unilabos.devices.mock.mock_chiller:MockChiller
type: python
status_types:
current_temperature: Float64
target_temperature: Float64
status: String
is_cooling: Bool
is_heating: Bool
vessel: String # 新增
purpose: String # 新增
action_value_mappings:
emergency_stop:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
heat_chill_start:
type: HeatChillStart
goal:
vessel: vessel
temp: temp
purpose: purpose
feedback: {}
result:
success: success
status: status
heat_chill_stop:
type: HeatChillStop
goal:
vessel: vessel
feedback: {}
result:
success: success
status: status
schema:
type: object
properties:
current_temperature:
type: number
description: Current temperature of the chiller in °C
target_temperature:
type: number
description: Target temperature setting in °C
status:
type: string
description: Current status of the device
is_cooling:
type: boolean
description: Whether the device is actively cooling
is_heating:
type: boolean
description: Whether the device is actively heating
vessel: # 新增
type: string
description: Current vessel being processed
purpose: # 新增
type: string
description: Purpose of the current operation
required:
- current_temperature
- target_temperature
- status
- vessel
- purpose
additionalProperties: false
mock_filter:
description: Mock Filter Device
class:
module: unilabos.devices.mock.mock_filter:MockFilter
type: python
status_types:
status: String
is_filtering: Bool
flow_rate: Float64
pressure_drop: Float64
filter_life: Float64
vessel: String
filtrate_vessel: String
filtered_volume: Float64
progress: Float64
stir: Bool
stir_speed: Float64
temperature: Float64
continue_heatchill: Bool
target_volume: Float64
action_value_mappings:
filter:
type: ProtocolFilter
goal:
vessel: vessel
filtrate_vessel: filtrate_vessel
stir: stir
stir_speed: stir_speed
temp: temp
continue_heatchill: continue_heatchill
volume: volume
feedback:
progress: progress
current_temp: current_temp
filtered_volume: filtered_volume
current_status: current_status
result:
success: success
message: message
stop_filtering:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
replace_filter:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
schema:
type: object
properties:
status:
type: string
description: Current status of the filter
is_filtering:
type: boolean
description: Whether the filter is actively filtering
flow_rate:
type: number
description: Current flow rate in L/min
pressure_drop:
type: number
description: Pressure drop across the filter in Pa
filter_life:
type: number
description: Remaining filter life percentage
power_on:
type: boolean
description: Power state of the device
required:
- status
- is_filtering
- flow_rate
- filter_life
- vessel
- filtrate_vessel
- filtered_volume
- progress
additionalProperties: false
mock_heater:
description: Mock Heater Device
class:
module: unilabos.devices.mock.mock_heater:MockHeater
type: python
status_types:
current_temperature: Float64
target_temperature: Float64
status: String
is_heating: Bool
heating_power: Float64
max_temperature: Float64
vessel: String
purpose: String
stir: Bool
stir_speed: Float64
action_value_mappings:
heat_chill_start:
type: HeatChillStart
goal:
vessel: vessel
temp: temp
purpose: purpose
feedback:
status: status
result:
success: success
heat_chill_stop:
type: HeatChillStop
goal:
vessel: vessel
feedback:
status: status
result:
success: success
heat_chill:
type: HeatChill
goal:
vessel: vessel
temp: temp
time: time
stir: stir
stir_speed: stir_speed
purpose: purpose
feedback:
status: status
result:
success: success
emergency_stop:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
schema:
type: object
properties:
current_temperature:
type: number
description: Current temperature of the heater in °C
target_temperature:
type: number
description: Target temperature setting in °C
status:
type: string
description: Current status of the device
is_heating:
type: boolean
description: Whether the device is actively heating
heating_power:
type: number
description: Current heating power percentage
max_temperature:
type: number
description: Maximum temperature limit
vessel:
type: string
description: Current vessel being heated
purpose:
type: string
description: Purpose of the heating operation
stir:
type: boolean
description: Whether stirring is enabled
stir_speed:
type: number
description: Current stirring speed
required:
- current_temperature
- target_temperature
- status
- vessel
- purpose
additionalProperties: false
mock_pump:
description: Mock Pump Device
class:
module: unilabos.devices.mock.mock_pump:MockPump
type: python
status_types:
status: String
pump_state: String
flow_rate: Float64
target_flow_rate: Float64
pressure: Float64
total_volume: Float64
max_flow_rate: Float64
max_pressure: Float64
from_vessel: String
to_vessel: String
transfer_volume: Float64
amount: String
transfer_time: Float64
is_viscous: Bool
rinsing_solvent: String
rinsing_volume: Float64
rinsing_repeats: Int32
is_solid: Bool
time_spent: Float64
time_remaining: Float64
current_device: String
action_value_mappings:
pump_transfer:
type: PumpTransfer
goal:
from_vessel: from_vessel
to_vessel: to_vessel
volume: volume
amount: amount
time: time
viscous: viscous
rinsing_solvent: rinsing_solvent
rinsing_volume: rinsing_volume
rinsing_repeats: rinsing_repeats
solid: solid
feedback:
status: status
current_device: current_device
time_spent: time_spent
time_remaining: time_remaining
result:
success: success
pause_pump:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
resume_pump:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
reset_volume_counter:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
schema:
type: object
properties:
status:
type: string
description: Current status of the pump
pump_state:
type: string
description: Pump operation state (Running/Stopped/Paused)
flow_rate:
type: number
description: Current flow rate in mL/min
target_flow_rate:
type: number
description: Target flow rate in mL/min
pressure:
type: number
description: Current pressure in bar
total_volume:
type: number
description: Total accumulated volume in mL
max_flow_rate:
type: number
description: Maximum flow rate in mL/min
max_pressure:
type: number
description: Maximum pressure in bar
from_vessel:
type: string
description: Source vessel for transfer
to_vessel:
type: string
description: Target vessel for transfer
transfer_volume:
type: number
description: Volume to transfer in mL
amount:
type: string
description: Amount description
transfer_time:
type: number
description: Transfer time in seconds
is_viscous:
type: boolean
description: Whether the liquid is viscous
rinsing_solvent:
type: string
description: Solvent used for rinsing
rinsing_volume:
type: number
description: Volume used for rinsing
rinsing_repeats:
type: integer
description: Number of rinsing cycles
is_solid:
type: boolean
description: Whether transferring solid material
current_device:
type: string
description: Current device identifier
required:
- status
- pump_state
- flow_rate
- from_vessel
- to_vessel
additionalProperties: false
mock_rotavap:
description: Mock Rotavap Device
class:
module: unilabos.devices.mock.mock_rotavap:MockRotavap
type: python
status_types:
status: String
rotate_state: String
rotate_time: Float64
rotate_speed: Float64
pump_state: String
pump_time: Float64
vacuum_level: Float64
temperature: Float64
target_temperature: Float64
success: String
action_value_mappings:
set_timer:
type: StrSingleInput
goal:
string: command
feedback: {}
result:
success: success
set_rotate_time:
type: FloatSingleInput
goal:
float_in: time_seconds
feedback: {}
result:
success: success
set_pump_time:
type: FloatSingleInput
goal:
float_in: time_seconds
feedback: {}
result:
success: success
set_rotate_speed:
type: FloatSingleInput
goal:
float_in: speed
feedback: {}
result:
success: success
set_temperature:
type: FloatSingleInput
goal:
float_in: temperature
feedback: {}
result:
success: success
start_rotation:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
start_pump:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
schema:
type: object
properties:
status:
type: string
description: Current status of the rotavap
rotate_state:
type: string
description: Rotation state (Running/Stopped)
rotate_time:
type: number
description: Remaining rotation time in seconds
rotate_speed:
type: number
description: Rotation speed in rpm
pump_state:
type: string
description: Pump state (Running/Stopped)
pump_time:
type: number
description: Remaining pump time in seconds
vacuum_level:
type: number
description: Current vacuum level in mbar
temperature:
type: number
description: Current water bath temperature
target_temperature:
type: number
description: Target water bath temperature
success:
type: string
description: Operation success status
required:
- status
- rotate_time
- pump_time
- temperature
additionalProperties: false
mock_separator:
description: Simplified Mock Separator Device
class:
module: unilabos.devices.mock.mock_separator:MockSeparator
type: python
status_types:
status: String
settling_time: Float64
valve_state: String
shake_time: Float64
shake_status: String
current_device: String
purpose: String
product_phase: String
from_vessel: String
separation_vessel: String
to_vessel: String
waste_phase_to_vessel: String
solvent: String
solvent_volume: Float64
through: String
repeats: Int32
stir_time: Float64
stir_speed: Float64
time_spent: Float64
time_remaining: Float64
action_value_mappings:
separate:
type: Separate
goal:
purpose: purpose
product_phase: product_phase
from_vessel: from_vessel
separation_vessel: separation_vessel
to_vessel: to_vessel
waste_phase_to_vessel: waste_phase_to_vessel
solvent: solvent
solvent_volume: solvent_volume
through: through
repeats: repeats
stir_time: stir_time
stir_speed: stir_speed
settling_time: settling_time
feedback:
status: status
current_device: current_device
time_spent: time_spent
time_remaining: time_remaining
result:
success: success
shake:
type: FloatSingleInput
goal:
float_in: shake_time
feedback:
status: status
result:
success: success
stop_operations:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
set_valve:
type: StrSingleInput
goal:
string: command
feedback: {}
result:
success: success
schema:
type: object
properties:
status:
type: string
description: Current status of the separator
settling_time:
type: number
description: Settling time in seconds
valve_state:
type: string
description: Valve state (Open/Closed)
shake_time:
type: number
description: Remaining shake time in seconds
shake_status:
type: string
description: Current shake state
purpose:
type: string
description: Separation purpose (wash/extract)
product_phase:
type: string
description: Product phase (top/bottom)
from_vessel:
type: string
description: Source vessel
separation_vessel:
type: string
description: Vessel for separation
to_vessel:
type: string
description: Target vessel
required:
- status
- valve_state
- shake_status
- current_device
additionalProperties: false
mock_solenoid_valve:
description: Mock Solenoid Valve Device
class:
module: unilabos.devices.mock.mock_solenoid_valve:MockSolenoidValve
type: python
status_types:
status: String
valve_status: String
action_value_mappings:
set_valve_status:
type: StrSingleInput
goal:
string: status
feedback: {}
result:
success: success
open_valve:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
close_valve:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
schema:
type: object
properties:
status:
type: string
description: Current status of the valve
valve_status:
type: string
description: Valve status (Open/Closed)
required:
- status
- valve_status
additionalProperties: false
mock_stirrer:
description: Mock Stirrer Device
class:
module: unilabos.devices.mock.mock_stirrer:MockStirrer
type: python
status_types:
status: String
stir_speed: Float64
target_stir_speed: Float64
stir_state: String
temperature: Float64
target_temperature: Float64
heating_state: String
heating_power: Float64
max_stir_speed: Float64
max_temperature: Float64
action_value_mappings:
set_stir_speed:
type: FloatSingleInput
goal:
float_in: speed
feedback: {}
result:
success: success
set_temperature:
type: FloatSingleInput
goal:
float_in: temperature
feedback: {}
result:
success: success
start_stirring:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
stop_stirring:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
heating_control:
type: StrSingleInput
goal:
string: heating_state
feedback: {}
result:
success: success
schema:
type: object
properties:
status:
type: string
description: Current status of the stirrer
stir_speed:
type: number
description: Current stirring speed in rpm
target_stir_speed:
type: number
description: Target stirring speed in rpm
stir_state:
type: string
description: Stirring state (Running/Stopped)
temperature:
type: number
description: Current temperature in °C
target_temperature:
type: number
description: Target temperature in °C
heating_state:
type: string
description: Heating state (On/Off)
heating_power:
type: number
description: Current heating power percentage
max_stir_speed:
type: number
description: Maximum stirring speed in rpm
max_temperature:
type: number
description: Maximum temperature in °C
required:
- status
- stir_speed
- temperature
- power_state
additionalProperties: false
mock_stirrer_new:
description: Mock Stirrer Device (Copy Version)
class:
module: unilabos.devices.mock.mock_stirrer_new:MockStirrer_new
type: python
status_types:
status: String
vessel: String
purpose: String
stir_speed: Float64
target_stir_speed: Float64
stir_state: String
stir_time: Float64
settling_time: Float64
progress: Float64
max_stir_speed: Float64
action_value_mappings:
start_stir:
type: ProtocolStartStir
goal:
vessel: vessel
stir_speed: stir_speed
purpose: purpose
feedback:
progress: progress
current_speed: stir_speed
current_status: status
result:
success: success
message: message
stir:
type: Stir
goal:
stir_time: stir_time
stir_speed: stir_speed
settling_time: settling_time
feedback:
status: status
result:
success: success
stop_stir:
type: ProtocolStopStir
goal:
vessel: vessel
feedback:
progress: progress
current_status: status
result:
success: success
message: message
schema:
type: object
properties:
status:
type: string
vessel:
type: string
purpose:
type: string
stir_speed:
type: number
target_stir_speed:
type: number
stir_state:
type: string
stir_time:
type: number
settling_time:
type: number
progress:
type: number
max_stir_speed:
type: number
required:
- status
- stir_speed
- stir_state
- vessel
additionalProperties: false
mock_vacuum:
description: Mock Vacuum Pump Device
class:
module: unilabos.devices.mock.mock_vacuum:MockVacuum
type: python
status_types:
status: String
power_state: String
pump_state: String
vacuum_level: Float64
target_vacuum: Float64
pump_speed: Float64
pump_efficiency: Float64
max_pump_speed: Float64
action_value_mappings:
power_control:
type: StrSingleInput
goal:
string: power_state
feedback: {}
result:
success: success
set_vacuum_level:
type: FloatSingleInput
goal:
float_in: vacuum_level
feedback: {}
result:
success: success
start_vacuum:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
stop_vacuum:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
pause_vacuum:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
resume_vacuum:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
vent_to_atmosphere:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
schema:
type: object
properties:
status:
type: string
description: Current status of the vacuum pump
power_state:
type: string
description: Power state (On/Off)
pump_state:
type: string
description: Pump operation state (Running/Stopped/Paused)
vacuum_level:
type: number
description: Current vacuum level in mbar
target_vacuum:
type: number
description: Target vacuum level in mbar
pump_speed:
type: number
description: Current pump speed in L/s
pump_efficiency:
type: number
description: Pump efficiency percentage
max_pump_speed:
type: number
description: Maximum pump speed in L/s
required:
- status
- power_state
- pump_state
- vacuum_level
additionalProperties: false

View File

@@ -0,0 +1,56 @@
moveit.toyo_xyz:
description: Toyo XYZ
class:
module: unilabos.devices.ros_dev.moveit_interface:MoveitInterface
type: python
action_value_mappings:
set_position:
type: SendCmd
goal:
command: command
feedback: { }
result: { }
pick_and_place:
type: SendCmd
goal:
command: command
feedback: { }
result: { }
set_status:
type: SendCmd
goal:
command: command
feedback: { }
result: { }
model:
type: device
mesh: toyo_xyz
moveit.arm_slider:
description: Arm with Slider
model:
type: device
mesh: arm_slider
class:
module: unilabos.devices.ros_dev.moveit_interface:MoveitInterface
type: python
action_value_mappings:
set_position:
type: SendCmd
goal:
command: command
feedback: {}
result: {}
pick_and_place:
type: SendCmd
goal:
command: command
feedback: {}
result: {}
set_status:
type: SendCmd
goal:
command: command
feedback: {}
result: {}

View File

@@ -23,20 +23,51 @@ syringe_pump_with_valve.runze:
type: string
description: The position of the valve
required:
- status
- position
- valve_position
- status
- position
- valve_position
additionalProperties: false
solenoid_valve.mock:
description: Mock solenoid valve
class:
module: unilabos.devices.pump_and_valve.solenoid_valve_mock:SolenoidValveMock
type: python
status_types:
status: String
valve_position: String
action_value_mappings:
open:
type: EmptyIn
goal: {}
feedback: {}
result: {}
close:
type: EmptyIn
goal: {}
feedback: {}
result: {}
handles:
input:
- handler_key: fluid-input
label: Fluid Input
data_type: fluid
output:
- handler_key: fluid-output
label: Fluid Output
data_type: fluid
init_param_schema:
type: object
properties:
port:
type: string
description: "通信端口"
default: "COM6"
required:
- port
solenoid_valve:
description: Solenoid valve
class:
module: unilabos.devices.pump_and_valve.solenoid_valve:SolenoidValve
type: python
type: python

View File

@@ -62,4 +62,4 @@ tempsensor:
command: command
feedback: {}
result:
success: success
success: success

View File

@@ -22,9 +22,76 @@ vacuum_pump.mock:
string: string
feedback: {}
result: {}
handles:
input:
- handler_key: fluid-input
label: Fluid Input
data_type: fluid
io_type: target
data_source: handle
data_key: fluid_in
output:
- handler_key: fluid-output
label: Fluid Output
data_type: fluid
io_type: source
data_source: executor
data_key: fluid_out
init_param_schema:
type: object
properties:
port:
type: string
description: "通信端口"
default: "COM6"
required:
- port
gas_source.mock:
description: Mock gas source
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: {}
handles:
input:
- handler_key: fluid-input
label: Fluid Input
data_type: fluid
io_type: target
data_source: handle
data_key: fluid_in
output:
- handler_key: fluid-output
label: Fluid Output
data_type: fluid
io_type: source
data_source: executor
data_key: fluid_out
init_param_schema:
type: object
properties:
port:
type: string
description: "通信端口"
default: "COM6"
required:
- port

View File

@@ -0,0 +1,388 @@
virtual_pump:
description: Virtual Pump for PumpTransferProtocol Testing
class:
module: unilabos.devices.virtual.virtual_pump:VirtualPump
type: python
status_types:
status: String
position: Float64
valve_position: Int32 # 修复:使用 Int32 而不是 String
max_volume: Float64
current_volume: Float64
action_value_mappings:
transfer:
type: PumpTransfer
goal:
from_vessel: from_vessel
to_vessel: to_vessel
volume: volume
amount: amount
time: time
viscous: viscous
rinsing_solvent: rinsing_solvent
rinsing_volume: rinsing_volume
rinsing_repeats: rinsing_repeats
solid: solid
feedback:
status: status
result:
success: success
set_valve_position:
type: FloatSingleInput
goal:
Int32: Int32
feedback:
status: status
result:
success: success
schema:
type: object
properties:
port:
type: string
default: "VIRTUAL"
max_volume:
type: number
default: 25.0
additionalProperties: false
virtual_stirrer:
description: Virtual Stirrer for StirProtocol Testing
class:
module: unilabos.devices.virtual.virtual_stirrer:VirtualStirrer
type: python
status_types:
status: String
action_value_mappings:
stir:
type: Stir
goal:
stir_time: stir_time
stir_speed: stir_speed
settling_time: settling_time
feedback:
status: status
result:
success: success
start_stir:
type: ProtocolStartStir
goal:
vessel: vessel
stir_speed: stir_speed
purpose: purpose
feedback:
status: status
result:
success: success
stop_stir:
type: ProtocolStopStir
goal:
vessel: vessel
feedback:
status: status
result:
success: success
schema:
type: object
properties:
port:
type: string
default: "VIRTUAL"
max_temp:
type: number
default: 100.0
max_speed:
type: number
default: 1000.0
additionalProperties: false
virtual_valve:
description: Virtual Valve for AddProtocol Testing
class:
module: unilabos.devices.virtual.virtual_valve:VirtualValve
type: python
status_types:
status: String
valve_state: String
current_position: Int32
target_position: Int32
max_positions: Int32
action_value_mappings:
set_position:
type: SendCmd
goal:
command: position
feedback: {}
result:
success: success
open:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
close:
type: EmptyIn
goal: {}
feedback: {}
result:
success: success
schema:
type: object
properties:
port:
type: string
default: "VIRTUAL"
positions:
type: integer
default: 6
additionalProperties: false
virtual_centrifuge:
description: Virtual Centrifuge for CentrifugeProtocol Testing
class:
module: unilabos.devices.virtual.virtual_centrifuge:VirtualCentrifuge
type: python
status_types:
status: String
current_speed: Float64
target_speed: Float64
current_temp: Float64
target_temp: Float64
max_speed: Float64
max_temp: Float64
min_temp: Float64
centrifuge_state: String
time_remaining: Float64
action_value_mappings:
centrifuge:
type: ProtocolCentrifuge
goal:
vessel: vessel
speed: speed
time: time
temp: temp
feedback:
progress: progress
current_speed: current_speed
current_temp: current_temp
current_status: status
result:
success: success
message: message
schema:
type: object
properties:
port:
type: string
default: "VIRTUAL"
max_speed:
type: number
default: 15000.0
max_temp:
type: number
default: 40.0
min_temp:
type: number
default: 4.0
additionalProperties: false
virtual_filter:
description: Virtual Filter for FilterProtocol Testing
class:
module: unilabos.devices.virtual.virtual_filter:VirtualFilter
type: python
status_types:
status: String
filter_state: String
current_temp: Float64
target_temp: Float64
max_temp: Float64
stir_speed: Float64
max_stir_speed: Float64
filtered_volume: Float64
progress: Float64
message: String
action_value_mappings:
filter_sample:
type: ProtocolFilter
goal:
vessel: vessel
filtrate_vessel: filtrate_vessel
stir: stir
stir_speed: stir_speed
temp: temp
continue_heatchill: continue_heatchill
volume: volume
feedback:
progress: progress
current_temp: current_temp
filtered_volume: filtered_volume
current_status: status
result:
success: success
message: message
schema:
type: object
properties:
port:
type: string
default: "VIRTUAL"
max_temp:
type: number
default: 100.0
max_stir_speed:
type: number
default: 1000.0
additionalProperties: false
virtual_heatchill:
description: Virtual HeatChill for HeatChillProtocol Testing
class:
module: unilabos.devices.virtual.virtual_heatchill:VirtualHeatChill
type: python
status_types:
status: String
action_value_mappings:
heat_chill:
type: HeatChill
goal:
vessel: vessel
temp: temp
time: time
stir: stir
stir_speed: stir_speed
purpose: purpose
feedback:
status: status
result:
success: success
heat_chill_start:
type: HeatChillStart
goal:
vessel: vessel
temp: temp
purpose: purpose
feedback:
status: status
result:
success: success
heat_chill_stop:
type: HeatChillStop
goal:
vessel: vessel
feedback:
status: status
result:
success: success
schema:
type: object
properties:
port:
type: string
default: "VIRTUAL"
max_temp:
type: number
default: 200.0
min_temp:
type: number
default: -80.0
max_stir_speed:
type: number
default: 1000.0
additionalProperties: false
virtual_transfer_pump:
description: Virtual Transfer Pump for TransferProtocol Testing
class:
module: unilabos.devices.virtual.virtual_transferpump:VirtualTransferPump
type: python
status_types:
status: String
current_volume: Float64
max_volume: Float64
transfer_rate: Float64
from_vessel: String
to_vessel: String
progress: Float64
transferred_volume: Float64
current_status: String
action_value_mappings:
transfer:
type: ProtocolTransfer
goal:
from_vessel: from_vessel
to_vessel: to_vessel
volume: volume
amount: amount
time: time
viscous: viscous
rinsing_solvent: rinsing_solvent
rinsing_volume: rinsing_volume
rinsing_repeats: rinsing_repeats
solid: solid
feedback:
progress: progress
transferred_volume: transferred_volume
current_status: current_status
result:
success: success
message: message
schema:
type: object
properties:
port:
type: string
default: "VIRTUAL"
max_volume:
type: number
default: 50.0
transfer_rate:
type: number
default: 5.0
additionalProperties: false
virtual_column:
description: Virtual Column for RunColumn Protocol Testing
class:
module: unilabos.devices.virtual.virtual_column:VirtualColumn
type: python
status_types:
status: String
column_state: String
current_flow_rate: Float64
max_flow_rate: Float64
column_length: Float64
column_diameter: Float64
processed_volume: Float64
progress: Float64
current_status: String
action_value_mappings:
run_column:
type: ProtocolRunColumn
goal:
from_vessel: from_vessel
to_vessel: to_vessel
column: column
feedback:
status: current_status
progress: progress
result:
success: success
message: message
schema:
type: object
properties:
port:
type: string
default: "VIRTUAL"
max_flow_rate:
type: number
default: 10.0
column_length:
type: number
default: 25.0
column_diameter:
type: number
default: 2.0
additionalProperties: false

View File

@@ -4,4 +4,4 @@ workstation:
module: unilabos.ros.nodes.presets.protocol_node:ROS2ProtocolNode
type: ros2
schema:
properties: {}
properties: {}

View File

@@ -25,9 +25,7 @@ class Registry:
self.ResourceCreateFromOuterEasy = self._replace_type_with_class(
"ResourceCreateFromOuterEasy", "host_node", f"动作 create_resource"
)
self.EmptyIn = self._replace_type_with_class(
"EmptyIn", "host_node", f""
)
self.EmptyIn = self._replace_type_with_class("EmptyIn", "host_node", f"")
self.device_type_registry = {}
self.resource_type_registry = {}
self._setup_called = False # 跟踪setup是否已调用
@@ -66,6 +64,7 @@ class Registry:
"goal_default": yaml.safe_load(
io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuter.Goal))
),
"handles": {},
},
"create_resource": {
"type": self.ResourceCreateFromOuterEasy,
@@ -86,6 +85,15 @@ class Registry:
"goal_default": yaml.safe_load(
io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuterEasy.Goal))
),
"handles": {
"output": [{
"handler_key": "labware",
"label": "Labware",
"data_type": "resource",
"data_source": "handle",
"data_key": "liquid"
}]
},
},
"test_latency": {
"type": self.EmptyIn,
@@ -94,11 +102,14 @@ class Registry:
"result": {"latency_ms": "latency_ms", "time_diff_ms": "time_diff_ms"},
"schema": ros_action_to_json_schema(self.EmptyIn),
"goal_default": {},
"handles": {},
},
},
},
"icon": "icon_device.webp",
"registry_type": "device",
"handles": [],
"init_param_schema": {},
"schema": {"properties": {}, "additionalProperties": False, "type": "object"},
"file_path": "/",
}
@@ -132,6 +143,10 @@ class Registry:
resource_info["description"] = ""
if "icon" not in resource_info:
resource_info["icon"] = ""
if "handles" not in resource_info:
resource_info["handles"] = []
if "init_param_schema" not in resource_info:
resource_info["init_param_schema"] = {}
resource_info["registry_type"] = "resource"
self.resource_type_registry.update(data)
logger.debug(
@@ -194,6 +209,10 @@ class Registry:
device_config["description"] = ""
if "icon" not in device_config:
device_config["icon"] = ""
if "handles" not in device_config:
device_config["handles"] = []
if "init_param_schema" not in device_config:
device_config["init_param_schema"] = {}
device_config["registry_type"] = "device"
if "class" in device_config:
# 处理状态类型
@@ -206,6 +225,8 @@ class Registry:
# 处理动作值映射
if "action_value_mappings" in device_config["class"]:
for action_name, action_config in device_config["class"]["action_value_mappings"].items():
if "handles" not in action_config:
action_config["handles"] = []
if "type" in action_config:
action_config["type"] = self._replace_type_with_class(
action_config["type"], device_id, f"动作 {action_name}"