Robotics StackExchange | Archived questions

GUI remains black opening .world file containing "sun" as global light source

Hi all,

I am using Gazebo 11. I have noticed that if I open a .world file containing sun as global light source, then the GUI remain completely black. The sun-light is added including the following lines in the .world file:

<include>
        <uri>model://sun</uri>
</include>

In particular, I am following the Velodyne tutorial.

When I run the file velodyne.world (here there is a link to the file C:\fakepath\velodyne.world), Gazebo opens but the screen remains totally black.

image description

Using the command --verbose, I get the following error:

simone@gandalf:~$ gazebo -u /media/simone/velodyne/velodyne.world --verbose
Gazebo multi-robot simulator, version 11.0.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
Gazebo multi-robot simulator, version 11.0.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 127.0.0.1
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 127.0.0.1

(gzclient:1749): dbind-WARNING **: 15:06:21.767: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
[Wrn] [GuiIface.cc:119] QApplication: invalid style override passed, ignoring it.
[Wrn] [Publisher.cc:136] Queue limit reached for topic /gazebo/default/user_camera/pose, deleting message. This warning is printed only once.

If I don't add the sun to the .world file, I get the same identical error, but the simulation runs correctly and what I get in the GUI is a dark, but still "visible", scene:

image description

How can I fix this issue? Thanks in advance!!!

Asked by Simone on 2020-05-05 04:44:56 UTC

Comments

What if you add the sun as follows in your sdf .world file?

<light name='sun' type='directional'>
  <cast_shadows>1</cast_shadows>
  <pose frame=''>0 0 10 0 -0 0</pose>
  <diffuse>0.8 0.8 0.8 1</diffuse>
  <specular>0.2 0.2 0.2 1</specular>
  <attenuation>
    <range>1000</range>
    <constant>0.9</constant>
    <linear>0.01</linear>
    <quadratic>0.001</quadratic>
  </attenuation>
  <direction>-0.5 0.1 -0.9</direction>
</light>

Asked by student_Ros_melodic_mobile_manipulator on 2020-05-15 01:41:23 UTC

Answers

I had the same problem but my --verbose look a little different from yours. My problem was the GAZEBO_MODEL_DATABASE_URI was wrong. If you could replace it with http://models.gazebosim.org/ inside /usr/share/gazebo-9/setup.sh (/usr/share/gazebo-11/setup.sh in your case) or make a new setup.sh with the correct link and source it, it should be fixed.

Asked by jasonkhan on 2020-06-21 02:36:48 UTC

Comments

I am sorry for replaying after such a long time! Anyway, I have just opened the setup.sh file but I believe that all is fine:

[...] export GAZEBO_MODEL_DATABASE_URI=http://models.gazebosim.org [...]

Asked by Simone on 2020-09-09 09:20:14 UTC