Robotics StackExchange | Archived questions

Error using depth sensor in Gazebo 7

Hi all,

I am using Ros kinetic, with Ubuntu 16.04. I am running Gazebo 7, trying to use the turtlebot demo. I ran the simulation using the following command:

$ roslaunch turtlebot_gazebo turtlebot_world.launch 

Sadly, the simulation crashes when I am try to read the rgbd sensor data... for example using image_view program. I got the following error:

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 28958, 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/jcacace/.ros/log/36b089ba-b996-11e7-b5cd-4ccc6a9b3c41/gazebo-2.log].
log file: /home/jcacace/.ros/log/36b089ba-b996-11e7-b5cd-4ccc6a9b3c41/gazebo-2*.log

Has anyone simulated the kinect with a similar set-up?

Thank you!

Asked by pacifica on 2017-10-25 07:10:19 UTC

Comments

Seeing as this is a crash in Gazebo itself, this should probably be reported on the issue trackers of either Gazebo, or gazebo_ros_pkgs.

Asked by gvdhoorn on 2017-10-25 07:32:27 UTC

Thank you. I will follow you suggestion.

Asked by pacifica on 2017-10-25 08:14:08 UTC

As a bit of additional info, I cannot replicate this crash on my 16.04+Kinetic machine using the same Ogre version. This likely is an issue with graphics drivers and/or OpenGL. Check out this bug where some have the same error that you do:

Asked by jarvisschultz on 2017-10-25 10:22:12 UTC

As an easy test you could try running export SVGA_VGPU10=0 in a terminal you launch Gazebo from as reported in this comment on previous bug

Asked by jarvisschultz on 2017-10-25 10:23:22 UTC

Hi jarvisschultz. Thanks to your suggestion I think that my issue was (probably) related to graphic acceleration or graphical card drivers. I re-installed Nvidia proprietary driver and now it works.

Asked by pacifica on 2017-10-25 10:47:31 UTC

Hi @pacifica, may I ask what commands you gave in to re-install the Nvidia proprietary driver ? I am experiencing the same issue, I tried using export SVGA_VGPU10=0 but it did not fix it, so I would like to try yours but I'm afraid I might do something wrong.... Thanks!

Asked by monabf on 2018-01-25 10:07:26 UTC

i found that changing fsaa variable to zero had solved this problem in some cases. link is provided by @jarvisschultz . But I have installed gazebo as a ros package from source and i am unable to find this variable if somebody could help

Asked by kamalpandey1993 on 2018-02-23 04:28:30 UTC

Answers

I was able to fix this by installing a later version of Gazebo:

  1. sudo apt-get remove *gazebo*
  2. sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable lsb_release -cs main" > /etc/apt/sources.list.d/gazebo-stable.list' # copy-paste this directly
  3. wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
  4. sudo apt update
  5. sudo apt-get install ros-kinetic-gazebo7*

Gazebo 7.4 appears to have fixed this and this setup should install 7.16.0.

Asked by Void on 2020-03-17 12:01:06 UTC

Comments