mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2025-12-17 13:01:12 +00:00
更新LiquidHandlerBiomek类,添加资源创建功能,优化协议创建方法,修复部分代码格式问题,更新YAML配置以支持新功能。
This commit is contained in:
@@ -349,6 +349,20 @@ class BaseROS2DeviceNode(Node, Generic[T]):
|
||||
response = rclient.call(request)
|
||||
# 应该先add_resource了
|
||||
res.response = "OK"
|
||||
# 如果driver自己就有assign的方法,那就使用driver自己的assign方法
|
||||
if hasattr(self.driver_instance, "create_resource"):
|
||||
create_resource_func = getattr(self.driver_instance, "create_resource")
|
||||
create_resource_func(
|
||||
resource_tracker=self.resource_tracker,
|
||||
resources=request.resources,
|
||||
bind_parent_id=bind_parent_id,
|
||||
bind_location=location,
|
||||
liquid_input_slot=LIQUID_INPUT_SLOT,
|
||||
liquid_type=ADD_LIQUID_TYPE,
|
||||
liquid_volume=LIQUID_VOLUME,
|
||||
slot_on_deck=slot,
|
||||
)
|
||||
return res
|
||||
# 接下来该根据bind_parent_id进行assign了,目前只有plr可以进行assign,不然没有办法输入到物料系统中
|
||||
resource = self.resource_tracker.figure_resource({"name": bind_parent_id})
|
||||
# request.resources = [convert_to_ros_msg(Resource, resources)]
|
||||
|
||||
Reference in New Issue
Block a user