From 9dfd58e9af00b3525d1b4e0cc5c17abe820d9758 Mon Sep 17 00:00:00 2001 From: Xuwznln <18435084+Xuwznln@users.noreply.github.com> Date: Wed, 14 Jan 2026 14:17:29 +0800 Subject: [PATCH] fix parent_uuid fetch when bind_parent_id == node_name --- unilabos/ros/nodes/base_device_node.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/unilabos/ros/nodes/base_device_node.py b/unilabos/ros/nodes/base_device_node.py index c99df6c..efe287d 100644 --- a/unilabos/ros/nodes/base_device_node.py +++ b/unilabos/ros/nodes/base_device_node.py @@ -392,9 +392,12 @@ class BaseROS2DeviceNode(Node, Generic[T]): parent_resource = self.resource_tracker.figure_resource( {"name": bind_parent_id} ) - for r in rts.root_nodes: - # noinspection PyUnresolvedReferences - r.res_content.parent_uuid = parent_resource.unilabos_uuid + for r in rts.root_nodes: + # noinspection PyUnresolvedReferences + r.res_content.parent_uuid = parent_resource.unilabos_uuid + else: + for r in rts.root_nodes: + r.res_content.parent_uuid = self.uuid if len(LIQUID_INPUT_SLOT) and LIQUID_INPUT_SLOT[0] == -1 and len(rts.root_nodes) == 1 and isinstance(rts.root_nodes[0], RegularContainer): # noinspection PyTypeChecker