浏览代码

Update node.py

That would fix the threading issue
JensOgorek 1 年之前
父节点
当前提交
b6a85b6061
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      examples/ros2/ros2_ws/src/gui/gui/node.py

+ 2 - 2
examples/ros2/ros2_ws/src/gui/gui/node.py

@@ -70,8 +70,8 @@ def main() -> None:
 def ros_main() -> None:
     rclpy.init()
     node = NiceGuiNode()
-    threading.Thread(target=node_spin, args=(node,), daemon=True).start()
-
+    node_spin(node)
+    
 
 app.on_startup(lambda: threading.Thread(target=ros_main).start())
 run.APP_IMPORT_STRING = f'{__name__}:app'  # ROS2 uses a non-standard module name, so we need to specify it here