From d297abfd19f10d5dff55675c197441fae18243ae Mon Sep 17 00:00:00 2001 From: Xuwznln <18435084+Xuwznln@users.noreply.github.com> Date: Tue, 10 Jun 2025 03:46:28 +0800 Subject: [PATCH] bump ver modify slot type --- README.md | 2 +- README_zh.md | 2 +- recipes/ros-humble-unilabos-msgs/recipe.yaml | 2 +- recipes/unilabos/recipe.yaml | 2 +- setup.py | 2 +- unilabos/ros/nodes/base_device_node.py | 7 ++++--- unilabos/ros/nodes/presets/host_node.py | 2 +- unilabos_msgs/action/ResourceCreateFromOuterEasy.action | 2 +- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4345f6d..3435276 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ conda env update --file unilabos-[YOUR_OS].yml -n environment_name # Currently, you need to install the `unilabos_msgs` package # You can download the system-specific package from the Release page -conda install ros-humble-unilabos-msgs-0.9.3-xxxxx.tar.bz2 +conda install ros-humble-unilabos-msgs-0.9.4-xxxxx.tar.bz2 # Install PyLabRobot and other prerequisites git clone https://github.com/PyLabRobot/pylabrobot plr_repo diff --git a/README_zh.md b/README_zh.md index 5a84b51..4f3607d 100644 --- a/README_zh.md +++ b/README_zh.md @@ -49,7 +49,7 @@ conda env update --file unilabos-[YOUR_OS].yml -n 环境名 # 现阶段,需要安装 `unilabos_msgs` 包 # 可以前往 Release 页面下载系统对应的包进行安装 -conda install ros-humble-unilabos-msgs-0.9.3-xxxxx.tar.bz2 +conda install ros-humble-unilabos-msgs-0.9.4-xxxxx.tar.bz2 # 安装PyLabRobot等前置 git clone https://github.com/PyLabRobot/pylabrobot plr_repo diff --git a/recipes/ros-humble-unilabos-msgs/recipe.yaml b/recipes/ros-humble-unilabos-msgs/recipe.yaml index b39e6cd..febca42 100644 --- a/recipes/ros-humble-unilabos-msgs/recipe.yaml +++ b/recipes/ros-humble-unilabos-msgs/recipe.yaml @@ -1,6 +1,6 @@ package: name: ros-humble-unilabos-msgs - version: 0.9.3 + version: 0.9.4 source: path: ../../unilabos_msgs folder: ros-humble-unilabos-msgs/src/work diff --git a/recipes/unilabos/recipe.yaml b/recipes/unilabos/recipe.yaml index 1aea514..51ddea1 100644 --- a/recipes/unilabos/recipe.yaml +++ b/recipes/unilabos/recipe.yaml @@ -1,6 +1,6 @@ package: name: unilabos - version: "0.9.3" + version: "0.9.4" source: path: ../.. diff --git a/setup.py b/setup.py index 6a57457..038d820 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ package_name = 'unilabos' setup( name=package_name, - version='0.9.3', + version='0.9.4', packages=find_packages(), include_package_data=True, install_requires=['setuptools'], diff --git a/unilabos/ros/nodes/base_device_node.py b/unilabos/ros/nodes/base_device_node.py index d7a51fd..eafdd71 100644 --- a/unilabos/ros/nodes/base_device_node.py +++ b/unilabos/ros/nodes/base_device_node.py @@ -343,8 +343,8 @@ class BaseROS2DeviceNode(Node, Generic[T]): ADD_LIQUID_TYPE = other_calling_param.pop("ADD_LIQUID_TYPE", []) LIQUID_VOLUME = other_calling_param.pop("LIQUID_VOLUME", []) LIQUID_INPUT_SLOT = other_calling_param.pop("LIQUID_INPUT_SLOT", []) - slot = other_calling_param.pop("slot", -1) - if slot >= 0: # slot为负数的时候采用assign方法 + slot = other_calling_param.pop("slot", "-1") + if slot != "-1": # slot为负数的时候采用assign方法 other_calling_param["slot"] = slot # 本地拿到这个物料,可能需要先做初始化? if isinstance(resources, list): @@ -408,9 +408,10 @@ class BaseROS2DeviceNode(Node, Generic[T]): empty_liquid_info_in[liquid_input_slot] = (liquid_type, liquid_volume) plr_instance.set_well_liquids(empty_liquid_info_in) if isinstance(resource, OTDeck) and "slot" in other_calling_param: + other_calling_param["slot"] = int(other_calling_param["slot"]) resource.assign_child_at_slot(plr_instance, **other_calling_param) else: - _discard_slot = other_calling_param.pop("slot", -1) + _discard_slot = other_calling_param.pop("slot", "-1") resource.assign_child_resource( plr_instance, Coordinate(location["x"], location["y"], location["z"]), diff --git a/unilabos/ros/nodes/presets/host_node.py b/unilabos/ros/nodes/presets/host_node.py index 6ad88e1..712e9b3 100644 --- a/unilabos/ros/nodes/presets/host_node.py +++ b/unilabos/ros/nodes/presets/host_node.py @@ -381,7 +381,7 @@ class HostNode(BaseROS2DeviceNode): liquid_input_slot: list[int], liquid_type: list[str], liquid_volume: list[int], - slot_on_deck: int, + slot_on_deck: str, ): init_new_res = initialize_resource( { diff --git a/unilabos_msgs/action/ResourceCreateFromOuterEasy.action b/unilabos_msgs/action/ResourceCreateFromOuterEasy.action index b4adaed..420602e 100644 --- a/unilabos_msgs/action/ResourceCreateFromOuterEasy.action +++ b/unilabos_msgs/action/ResourceCreateFromOuterEasy.action @@ -6,7 +6,7 @@ geometry_msgs/Point bind_locations int32[] liquid_input_slot string[] liquid_type float32[] liquid_volume -int32 slot_on_deck +string slot_on_deck --- string return_info bool success