mirror of
https://github.com/dptech-corp/Uni-Lab-OS.git
synced 2026-02-07 23:45:10 +00:00
fix protocol_node communication transfer
This commit is contained in:
@@ -84,7 +84,7 @@ def canonicalize_links_ports(data: dict) -> dict:
|
|||||||
# 第一遍处理:将字符串类型的port转换为字典格式
|
# 第一遍处理:将字符串类型的port转换为字典格式
|
||||||
for link in data.get("links", []):
|
for link in data.get("links", []):
|
||||||
port = link.get("port")
|
port = link.get("port")
|
||||||
if link["type"] == "physical":
|
if link.get("type", "physical") == "physical":
|
||||||
link["type"] = "fluid"
|
link["type"] = "fluid"
|
||||||
if isinstance(port, int):
|
if isinstance(port, int):
|
||||||
port = str(port)
|
port = str(port)
|
||||||
|
|||||||
@@ -84,7 +84,11 @@ class ROS2ProtocolNode(BaseROS2DeviceNode):
|
|||||||
self.communication_node_id_to_instance[device_id] = d
|
self.communication_node_id_to_instance[device_id] = d
|
||||||
continue
|
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:
|
if d:
|
||||||
hardware_interface = d.ros_node_instance._hardware_interface
|
hardware_interface = d.ros_node_instance._hardware_interface
|
||||||
if (
|
if (
|
||||||
|
|||||||
Reference in New Issue
Block a user