From e5d977e8841de5295db7ecb218c9785f64ee83a5 Mon Sep 17 00:00:00 2001 From: wznln <18435084+Xuwznln@users.noreply.github.com> Date: Thu, 15 May 2025 00:03:28 +0800 Subject: [PATCH] fix device_id --- unilabos/ros/msgs/message_converter.py | 5 ++++- unilabos_msgs/action/ResourceCreateFromOuterEasy.action | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/unilabos/ros/msgs/message_converter.py b/unilabos/ros/msgs/message_converter.py index e1659e1a..c9f8af3c 100644 --- a/unilabos/ros/msgs/message_converter.py +++ b/unilabos/ros/msgs/message_converter.py @@ -351,7 +351,10 @@ def convert_to_ros_msg(ros_msg_type: Union[Type, Any], obj: Any) -> Any: else: setattr(ros_msg, key, []) # FIXME elif "array.array" in str(type(attr)): - setattr(ros_msg, key, value) + if attr.typecode == "f": + setattr(ros_msg, key, [float(i) for i in value]) + else: + setattr(ros_msg, key, value) else: nested_ros_msg = convert_to_ros_msg(type(attr)(), value) setattr(ros_msg, key, nested_ros_msg) diff --git a/unilabos_msgs/action/ResourceCreateFromOuterEasy.action b/unilabos_msgs/action/ResourceCreateFromOuterEasy.action index bbd34810..233200c4 100644 --- a/unilabos_msgs/action/ResourceCreateFromOuterEasy.action +++ b/unilabos_msgs/action/ResourceCreateFromOuterEasy.action @@ -1,4 +1,5 @@ string res_id +string device_id string class_name string parent geometry_msgs/Point bind_locations