<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[ros2中Gazebo仿真]]></title><description><![CDATA[<p dir="auto">问题:Ubuntu 22.04 运行 Gazebo 11 启动卡死，报 Waited 11 seconds for namespaces<br />
背景：<br />
目前正在 VirtualBox 虚拟机环境下的 Ubuntu 22.04 系统中学习 ROS2 Humble。我需要使用 Gazebo 进行机器人仿真项目，但目前无法成功打开仿真环境。</p>
<p dir="auto">问题描述：<br />
当我尝试在终端运行 gazebo --verbose 时，程序无法进入图形界面，并弹出“Gazebo 无响应”的系统对话框。</p>
<p dir="auto">核心终端报错日志（如附图所示）：</p>
<p dir="auto">[Msg] Connected to gazebo master @ <a href="http://127.0.0.1:11345" target="_blank" rel="noopener noreferrer nofollow ugc">http://127.0.0.1:11345</a></p>
<p dir="auto">[Msg] Publicized address: 10.0.2.15</p>
<p dir="auto">[Msg] Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome.</p>
<p dir="auto">[Wrn] [<a href="http://Server.cc:579" target="_blank" rel="noopener noreferrer nofollow ugc">Server.cc:579</a>] Waited 1seconds for namespaces. (循环 10 次)</p>
<p dir="auto">[Err] [<a href="http://Server.cc:584" target="_blank" rel="noopener noreferrer nofollow ugc">Server.cc:584</a>] Waited 11 seconds for namespaces. Giving up.</p>
<p dir="auto">[Err] [<a href="http://Node.cc:118" target="_blank" rel="noopener noreferrer nofollow ugc">Node.cc:118</a>] No namespaces found</p>
<p dir="auto">具体细节和上下文：<br />
软件版本：Gazebo 11.10.2 / ROS2 Humble。</p>
<p dir="auto">硬件环境：VirtualBox 虚拟机，已分配足够的内存和 CPU 核心。</p>
<p dir="auto">网络情况：ping localhost 正常。</p>
<p dir="auto">特殊现象：Gazebo 窗口虽能弹出黑框，但立即卡死并提示无响应。日志显示它虽然连上了 127.0.0.1，但公布的地址（Publicized address）是虚拟机的 NAT 地址 10.0.2.15。</p>
<p dir="auto">尝试过的解决方法：<br />
执行过 killall -9 gzserver gzclient 清理进程。</p>
<p dir="auto">清理过 ~/.gazebo/log/* 路径下的日志文件。</p>
<p dir="auto">尝试过 unset 相关的环境变量。</p>
<p dir="auto">目前的困境：无论如何设置 IP 环境变量，依然卡在命名空间（namespaces）等待环节。<img src="/forum/assets/uploads/files/1777640010754-6451e819-19c3-499e-838e-69640053f437-image-resized.png" alt="6451e819-19c3-499e-838e-69640053f437-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://fishros.org.cn/forum/topic/4767/ros2中gazebo仿真</link><generator>RSS for Node</generator><lastBuildDate>Wed, 26 Aug 2026 16:02:49 GMT</lastBuildDate><atom:link href="https://fishros.org.cn/forum/topic/4767.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 01 May 2026 12:52:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ros2中Gazebo仿真 on Thu, 07 May 2026 12:08:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fishros.org.cn/forum/uid/33060">@2402714372</a> 解决了吗 我也是这样</p>
]]></description><link>https://fishros.org.cn/forum/post/19620</link><guid isPermaLink="true">https://fishros.org.cn/forum/post/19620</guid><dc:creator><![CDATA[rambo]]></dc:creator><pubDate>Thu, 07 May 2026 12:08:28 GMT</pubDate></item></channel></rss>