host node新增resource add时间统计

create_resource新增handle
bump version to 0.9.2
This commit is contained in:
Xuwznln
2025-06-08 13:23:55 +08:00
parent b6c9530c61
commit c0b7f2decd
50 changed files with 60 additions and 8 deletions

View File

@@ -45,7 +45,7 @@ conda env update --file unilabos-[YOUR_OS].yml -n environment_name
# Currently, you need to install the `unilabos_msgs` package # Currently, you need to install the `unilabos_msgs` package
# You can download the system-specific package from the Release page # You can download the system-specific package from the Release page
conda install ros-humble-unilabos-msgs-0.9.1-xxxxx.tar.bz2 conda install ros-humble-unilabos-msgs-0.9.2-xxxxx.tar.bz2
# Install PyLabRobot and other prerequisites # Install PyLabRobot and other prerequisites
git clone https://github.com/PyLabRobot/pylabrobot plr_repo git clone https://github.com/PyLabRobot/pylabrobot plr_repo

View File

@@ -45,7 +45,7 @@ conda env update --file unilabos-[YOUR_OS].yml -n 环境名
# 现阶段,需要安装 `unilabos_msgs` 包 # 现阶段,需要安装 `unilabos_msgs` 包
# 可以前往 Release 页面下载系统对应的包进行安装 # 可以前往 Release 页面下载系统对应的包进行安装
conda install ros-humble-unilabos-msgs-0.9.1-xxxxx.tar.bz2 conda install ros-humble-unilabos-msgs-0.9.2-xxxxx.tar.bz2
# 安装PyLabRobot等前置 # 安装PyLabRobot等前置
git clone https://github.com/PyLabRobot/pylabrobot plr_repo git clone https://github.com/PyLabRobot/pylabrobot plr_repo

View File

@@ -1,6 +1,6 @@
package: package:
name: ros-humble-unilabos-msgs name: ros-humble-unilabos-msgs
version: 0.9.1 version: 0.9.2
source: source:
path: ../../unilabos_msgs path: ../../unilabos_msgs
folder: ros-humble-unilabos-msgs/src/work folder: ros-humble-unilabos-msgs/src/work

View File

@@ -1,6 +1,6 @@
package: package:
name: unilabos name: unilabos
version: "0.9.1" version: "0.9.2"
source: source:
path: ../.. path: ../..

View File

@@ -4,7 +4,7 @@ package_name = 'unilabos'
setup( setup(
name=package_name, name=package_name,
version='0.9.1', version='0.9.2',
packages=find_packages(), packages=find_packages(),
include_package_data=True, include_package_data=True,
install_requires=['setuptools'], install_requires=['setuptools'],

View File

@@ -85,7 +85,15 @@ class Registry:
"goal_default": yaml.safe_load( "goal_default": yaml.safe_load(
io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuterEasy.Goal)) io.StringIO(get_yaml_from_goal_type(self.ResourceCreateFromOuterEasy.Goal))
), ),
"handles": {}, "handles": {
"output": [{
"handler_key": "Labware",
"label": "Labware",
"data_type": "resource",
"data_source": "handle",
"data_key": "liquid"
}]
},
}, },
"test_latency": { "test_latency": {
"type": self.EmptyIn, "type": self.EmptyIn,

View File

@@ -203,8 +203,10 @@ class HostNode(BaseROS2DeviceNode):
try: try:
for bridge in self.bridges: for bridge in self.bridges:
if hasattr(bridge, "resource_add"): if hasattr(bridge, "resource_add"):
self.lab_logger().info("[Host Node-Resource] Adding resources to bridge.") resource_start_time = time.time()
resource_add_res = bridge.resource_add(add_schema(resource_with_parent_name)) resource_add_res = bridge.resource_add(add_schema(resource_with_parent_name))
resource_end_time = time.time()
self.lab_logger().info(f"[Host Node-Resource] Adding resources to bridge. {round(resource_start_time - resource_end_time, 5)} seconds")
except Exception as ex: except Exception as ex:
self.lab_logger().error("[Host Node-Resource] 添加物料出错!") self.lab_logger().error("[Host Node-Resource] 添加物料出错!")
self.lab_logger().error(traceback.format_exc()) self.lab_logger().error(traceback.format_exc())

View File

@@ -4,6 +4,7 @@ string from_repo_position
Resource to_repo Resource to_repo
string to_repo_position string to_repo_position
--- ---
string return_info
bool success bool success
--- ---
string status string status

View File

@@ -5,6 +5,7 @@ float64 volume # Optional. Volume of solvent to clean vessel with.
float64 temp # Optional. Temperature to heat vessel to while cleaning. float64 temp # Optional. Temperature to heat vessel to while cleaning.
int32 repeats # Optional. Number of cleaning cycles to perform. int32 repeats # Optional. Number of cleaning cycles to perform.
--- ---
string return_info
bool success bool success
--- ---
string status string status

View File

@@ -1,4 +1,4 @@
--- ---
string return_info
--- ---

View File

@@ -3,6 +3,7 @@ string vessel
string gas string gas
int32 repeats int32 repeats
--- ---
string return_info
bool success bool success
--- ---
string status string status

View File

@@ -5,6 +5,7 @@ float64 temp
float64 time float64 time
float64 stir_speed float64 stir_speed
--- ---
string return_info
bool success bool success
--- ---
string status string status

View File

@@ -1,4 +1,5 @@
float64 float_in float64 float_in
--- ---
string return_info
bool success bool success
--- ---

View File

@@ -6,6 +6,7 @@ bool stir
float64 stir_speed float64 stir_speed
string purpose string purpose
--- ---
string return_info
bool success bool success
--- ---
string status string status

View File

@@ -3,6 +3,7 @@ string vessel
float64 temp float64 temp
string purpose string purpose
--- ---
string return_info
bool success bool success
--- ---
string status string status

View File

@@ -1,6 +1,7 @@
# Organic # Organic
string vessel string vessel
--- ---
string return_info
bool success bool success
--- ---
string status string status

View File

@@ -1,4 +1,5 @@
int32 int_input int32 int_input
--- ---
string return_info
bool success bool success
--- ---

View File

@@ -15,6 +15,7 @@ int32 mix_rate
float64 mix_liquid_height float64 mix_liquid_height
string[] none_keys string[] none_keys
--- ---
string return_info
bool success bool success
--- ---
# 反馈 # 反馈

View File

@@ -7,5 +7,6 @@ float64[] liquid_height
float64[] blow_out_air_volume float64[] blow_out_air_volume
string spread string spread
--- ---
string return_info
bool success bool success
--- ---

View File

@@ -3,6 +3,7 @@
int32[] use_channels int32[] use_channels
--- ---
# 结果字段 # 结果字段
string return_info
bool success bool success
--- ---
# 反馈字段 # 反馈字段

View File

@@ -8,6 +8,7 @@ int32[] blow_out_air_volume
string spread string spread
--- ---
# 结果字段 # 结果字段
string return_info
bool success bool success
--- ---
# 反馈字段 # 反馈字段

View File

@@ -6,6 +6,7 @@ geometry_msgs/Point[] offsets
bool allow_nonzero_volume bool allow_nonzero_volume
--- ---
# 结果字段 # 结果字段
string return_info
bool success bool success
--- ---
# 反馈字段 # 反馈字段

View File

@@ -5,6 +5,7 @@ geometry_msgs/Point offset
bool allow_nonzero_volume bool allow_nonzero_volume
--- ---
# 结果字段 # 结果字段
string return_info
bool success bool success
--- ---
# 反馈字段 # 反馈字段

View File

@@ -1,5 +1,6 @@
int32 time int32 time
--- ---
string return_info
bool success bool success
--- ---

View File

@@ -6,6 +6,7 @@ geometry_msgs/Point[] offsets
float64 mix_rate float64 mix_rate
string[] none_keys string[] none_keys
--- ---
string return_info
bool success bool success
--- ---
# 反馈 # 反馈

View File

@@ -2,5 +2,6 @@ string source
string target string target
--- ---
string return_info
bool success bool success
--- ---

View File

@@ -12,6 +12,7 @@ string put_direction
float64 pickup_distance_from_top float64 pickup_distance_from_top
--- ---
# 结果字段 # 结果字段
string return_info
bool success bool success
--- ---
# 反馈字段 # 反馈字段

View File

@@ -13,6 +13,7 @@ string put_direction
float64 pickup_distance_from_top float64 pickup_distance_from_top
--- ---
# 结果字段 # 结果字段
string return_info
bool success bool success
--- ---
# 反馈字段 # 反馈字段

View File

@@ -12,6 +12,7 @@ string get_direction
string put_direction string put_direction
--- ---
# 结果字段 # 结果字段
string return_info
bool success bool success
--- ---
# 反馈字段 # 反馈字段

View File

@@ -2,6 +2,7 @@ Resource well
float64 dis_to_top float64 dis_to_top
int32 channel int32 channel
--- ---
string return_info
bool success bool success
--- ---
# 反馈 # 反馈

View File

@@ -2,5 +2,6 @@ int32 rpm
int32 time int32 time
--- ---
string return_info
bool success bool success
--- ---

View File

@@ -5,6 +5,7 @@ int32[] use_channels
geometry_msgs/Point[] offsets geometry_msgs/Point[] offsets
--- ---
# 结果字段 # 结果字段
string return_info
bool success bool success
--- ---
# 反馈字段 # 反馈字段

View File

@@ -4,6 +4,7 @@ Resource tip_rack
geometry_msgs/Point offset geometry_msgs/Point offset
--- ---
# 结果字段 # 结果字段
string return_info
bool success bool success
--- ---
# 反馈字段 # 反馈字段

View File

@@ -6,4 +6,5 @@ string protocol_date
string protocol_type string protocol_type
string[] none_keys string[] none_keys
--- ---
string return_info
--- ---

View File

@@ -12,6 +12,7 @@ bool is_96_well
float64[] top float64[] top
string[] none_keys string[] none_keys
--- ---
string return_info
bool success bool success
--- ---
# 反馈 # 反馈

View File

@@ -4,6 +4,7 @@ int32[] use_channels
bool allow_nonzero_volume bool allow_nonzero_volume
--- ---
# 结果字段 # 结果字段
string return_info
bool success bool success
--- ---
# 反馈字段 # 反馈字段

View File

@@ -3,6 +3,7 @@
bool allow_nonzero_volume bool allow_nonzero_volume
--- ---
# 结果字段 # 结果字段
string return_info
bool success bool success
--- ---
# 反馈字段 # 反馈字段

View File

@@ -7,6 +7,7 @@ float64 aspiration_flow_rate
float64 dispense_flow_rate float64 dispense_flow_rate
--- ---
# 结果字段 # 结果字段
string return_info
bool success bool success
--- ---
# 反馈字段 # 反馈字段

View File

@@ -20,6 +20,7 @@ float64 mix_liquid_height
int32[] delays int32[] delays
string[] none_keys string[] none_keys
--- ---
string return_info
bool success bool success
--- ---
# 反馈 # 反馈

View File

@@ -6,5 +6,6 @@ string aspirate_technique
string dispense_technique string dispense_technique
--- ---
string return_info
bool success bool success
--- ---

View File

@@ -2,5 +2,6 @@ float64 x
float64 y float64 y
float64 z float64 z
--- ---
string return_info
bool success bool success
--- ---

View File

@@ -10,6 +10,7 @@ float64 rinsing_volume
int32 rinsing_repeats int32 rinsing_repeats
bool solid bool solid
--- ---
string return_info
bool success bool success
--- ---
string status string status

View File

@@ -4,5 +4,6 @@ string[] bind_parent_ids
geometry_msgs/Point[] bind_locations geometry_msgs/Point[] bind_locations
string[] other_calling_params string[] other_calling_params
--- ---
string return_info
bool success bool success
--- ---

View File

@@ -8,5 +8,6 @@ string[] liquid_type
float32[] liquid_volume float32[] liquid_volume
int32 slot_on_deck int32 slot_on_deck
--- ---
string return_info
bool success bool success
--- ---

View File

@@ -1,6 +1,7 @@
# Simple # Simple
string command string command
--- ---
string return_info
bool success bool success
--- ---
string status string status

View File

@@ -13,6 +13,7 @@ float64 stir_time # Optional. Time stir for after adding solvent, before separat
float64 stir_speed # Optional. Speed to stir at after adding solvent, before separation of phases. float64 stir_speed # Optional. Speed to stir at after adding solvent, before separation of phases.
float64 settling_time # Optional. Time float64 settling_time # Optional. Time
--- ---
string return_info
bool success bool success
--- ---
string status string status

View File

@@ -2,6 +2,7 @@ int32 powder_tube_number
string target_tube_position string target_tube_position
float64 compound_mass float64 compound_mass
--- ---
string return_info
float64 actual_mass_mg float64 actual_mass_mg
bool success bool success
--- ---

View File

@@ -3,6 +3,7 @@ float64 stir_time
float64 stir_speed float64 stir_speed
float64 settling_time float64 settling_time
--- ---
string return_info
bool success bool success
--- ---
string status string status

View File

@@ -1,4 +1,5 @@
string string string string
--- ---
string return_info
bool success bool success
--- ---

View File

@@ -3,6 +3,7 @@ string wf_name
string params string params
Resource resource Resource resource
--- ---
string return_info
bool success bool success
--- ---
string status string status