我在 Oracle VM Virtual Box 上的 Ubuntu 16.04 中运行 ros kinetic。
我正在启动 gazebo:
roslaunch turtlebot_gazebo turtlebot_world.launch
然后我尝试回应/scan 主题:(我已经检查过它正在发布):
rostopic echo /scan
输出:
WARNING: no messages received and simulated time is active.
Is /clock being published?
/clock 确实正在发布。
然后 gazebo 崩溃并显示以下内容:
gzserver: /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreRenderSystem.cpp:546: virtual void Ogre::RenderSystem::setDepthBufferFor(Ogre::RenderTarget*): Assertion `bAttached && "A new DepthBuffer for a RenderTarget was created, but after creation" "it says it's incompatible with that RT"' failed.
Aborted (core dumped)
[gazebo-2] process has died [pid 8979, exit code 134, cmd /opt/ros/kinetic/lib/gazebo_ros/gzserver -e ode /opt/ros/kinetic/share/turtlebot_gazebo/worlds/playground.world __name:=gazebo __log:=/home/joshua/.ros/log/409e3080-4711-11e9-abe9-0800270fc685/gazebo-2.log]. log file: /home/joshua/.ros/log/409e3080-4711-11e9-abe9-0800270fc685/gazebo-2*.log
我已经尝试设置我的 VM 来加速 3D 图形,创建我自己的订阅/scan 的 rosnode 并查看我能找到的帮助线程,但我仍然无法解决这个问题。任何帮助都会很棒。
补充说明:
我可以很好地 rostopic echo/clock
,也可以很好地控制带有 teleop 的 turtlebot。
最佳答案
为了解决这个问题,我需要更新 gazebo:
第一步:
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
第 2 步:
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
第 3 步:
sudo apt-get update
第四步:
sudo apt-get install gazebo7
使用 rostopic echo/scan
访问/scan 主题现在可以按预期工作。
关于c++ - 订阅/扫描时 Gazebo 崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55181205/