mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-04 21:35:09 +00:00
fix protocol_node communication transfer
This commit is contained in:
@@ -84,7 +84,7 @@ def canonicalize_links_ports(data: dict) -> dict:
|
||||
# 第一遍处理:将字符串类型的port转换为字典格式
|
||||
for link in data.get("links", []):
|
||||
port = link.get("port")
|
||||
if link["type"] == "physical":
|
||||
if link.get("type", "physical") == "physical":
|
||||
link["type"] = "fluid"
|
||||
if isinstance(port, int):
|
||||
port = str(port)
|
||||
|
||||
@@ -84,7 +84,11 @@ class ROS2ProtocolNode(BaseROS2DeviceNode):
|
||||
self.communication_node_id_to_instance[device_id] = d
|
||||
continue
|
||||
|
||||
for device_id, device_config in self.children.items():
|
||||
if device_config.get("type", "device") != "device":
|
||||
continue
|
||||
# 设置硬件接口代理
|
||||
d = self.sub_devices[device_id]
|
||||
if d:
|
||||
hardware_interface = d.ros_node_instance._hardware_interface
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user