fix device_id

This commit is contained in:
wznln
2025-05-15 00:03:28 +08:00
parent 02425f89e9
commit e5d977e884
2 changed files with 5 additions and 1 deletions

View File

@@ -351,6 +351,9 @@ 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)):
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)

View File

@@ -1,4 +1,5 @@
string res_id
string device_id
string class_name
string parent
geometry_msgs/Point bind_locations