Gazebo | Ignition | Community
Ask Your Question
4

No shadows or lights in Gazebo

asked 2018-11-20 04:22:01 -0600

RandC gravatar image

Hi there!

I'm having trouble setting up a light in Gazebo. I tried with sunlight, directional light and spot light, and the results of each of those are quite similar, something like this.

image description

I don't know what am I doing wrong, but I tried on another computer with the same settings and they work properly.

I'm using Ubuntu 16.04 LTS with ROS Kinetic

Greetings.

edit retag flag offensive close merge delete

10 Answers

Sort by ยป oldest newest most voted
1

answered 2018-12-16 09:01:22 -0600

windblow gravatar image

I've seen this happening with every graphics card except nvidia.

edit flag offensive delete link more

Comments

You are right. I wonder why this error still happens and it has been lasted half a year.

littleghost gravatar imagelittleghost ( 2019-02-25 22:03:19 -0600 )edit

Could you tell me if you have fixed it out on an Intel GPU's PC?

littleghost gravatar imagelittleghost ( 2019-02-26 06:28:17 -0600 )edit

I have same issue with AMD GPU and gazebo 9.x, so it's still here.

windblow gravatar imagewindblow ( 2019-05-03 08:11:49 -0600 )edit

Are there any errors reported in ~/.gazebo/ogre.log ?

mogumbo gravatar imagemogumbo ( 2019-05-08 12:27:13 -0600 )edit

No errors, log is mostly the same as nvidia one.

windblow gravatar imagewindblow ( 2019-05-14 13:46:25 -0600 )edit

I can't duplicate the problem here. I got my employer to give me sudo for switching graphics adapters so I was able to try my laptop's Intel graphics. A basic gazebo .world with a "sun" light works for me on Intel. I'm using Gazebo 9.8.0-1~bionic on Ubuntu 18.04.

mogumbo gravatar imagemogumbo ( 2019-05-16 10:36:54 -0600 )edit

Can you check Device Name in your ogre.log? Still have no success on multiple Intel/AMD machines.

windblow gravatar imagewindblow ( 2019-08-20 15:27:43 -0600 )edit

Here's the same issue on bitbucket. Maybe if it gets more votes we would manage to draw some attention to the problem. https://bitbucket.org/osrf/gazebo/iss...

windblow gravatar imagewindblow ( 2019-08-20 15:32:17 -0600 )edit
1

answered 2022-01-23 12:19:19 -0600

leuko gravatar image

updated 2022-02-08 15:42:35 -0600

I have an onboard Intel GPU and have the same problem. Like Louise above suggested I run the setup.sh for Gazebo and have the GAZEBO_RESOURCE_PATH, GAZEBO_PLUGIN_PATH and GAZEBO_MODEL_PATH set. I also tried to compile Gazebo (but not all the dependencies) which did not change the rendering. Still some models are so dark that their details are not visible.

My workaround was to click on the World tab, then on Scene and finally deactivate shadows. If shadows is already deactivated, then toggle it.

An issue is still open on the repo.


Here are other related questions with the hope that the users would arrive on this page:

edit flag offensive delete link more
0

answered 2020-07-21 07:22:08 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I had the same problem using Ubuntu 18.04 LTS with gazebo9.

My problem was related to BIOS secure boot which requires a particular driver installation procedure, as shown in this tutorial:

https://gist.github.com/bitsurgeon/b0...

I have not tried that procedure, but I simply disabled Secure Boot option in BIOS and reinstall the NVIDIA drivers and now gazebo works correctly.

edit flag offensive delete link more
0

answered 2019-05-07 22:47:45 -0600

littleghost gravatar image

I find that, if you compile gazebo yourself, then will not meet this problem.

edit flag offensive delete link more

Comments

What graphic card do you use?

AchmadFathoni gravatar imageAchmadFathoni ( 2019-05-22 20:41:08 -0600 )edit

An normal Intel Integrated Graphics 550.

littleghost gravatar imagelittleghost ( 2019-05-22 22:32:46 -0600 )edit

Well I also use Intel GPU and install Gazebo from source but no luck. Object doesn't stop light so there is no shadow.

AchmadFathoni gravatar imageAchmadFathoni ( 2019-05-22 23:00:14 -0600 )edit
0

answered 2019-07-02 08:52:35 -0600

Carolina68 gravatar image

I hhave got the same problem with Ubuntu 18.04.01 + ROS Melodic. My solution is to switch the graphic card from Intel HD Graphics to Nvidia Quadro M1200 on my computer, the problem is sovled and now Gazebo functions normally.

edit flag offensive delete link more
0

answered 2019-04-20 04:17:48 -0600

Actually, I'm having the same problem. When the Intel graphic card is used Gazebo is not able to render the shadows, on the other hand, with an Nvidia card the issue disappears.

The worst thing is that gazebo is not returning any error or warning

gazebo --verbose
Gazebo multi-robot simulator, version 10.1.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 10.1.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: 192.168.1.77
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.1.77

Is there anyone that can explain to me why there is this problem?

edit flag offensive delete link more
0

answered 2018-11-20 12:04:04 -0600

chapulina gravatar image

I've seen this happening when Gazebo can't find some material resources it needs. Could you try sourcing the setup file before launching Gazebo?

You can find the file as follows:

find /usr -name setup.sh

Then source it like this for example:

. /usr/local/share/gazebo/setup.sh
edit flag offensive delete link more

Comments

I tried to do that, but the sourcing is not clear to me. Should I write "source /usr/share/gazebo/setup.sh"? Because if so, it doesn't work...

RandC gravatar imageRandC ( 2018-11-23 02:50:35 -0600 )edit

Yeah that's what you should do. Run that, and then run Gazebo in the same terminal...

chapulina gravatar imagechapulina ( 2018-11-25 21:34:51 -0600 )edit

Also, if you run Gazebo in verbose mode, do you see any errors? "gazebo --verbose"

chapulina gravatar imagechapulina ( 2018-11-25 21:35:29 -0600 )edit

No error whatsoever. I sourced the path like you said, and then ran Gazebo --verbose. This is the output: Gazebo multi-robot simulator, version 7.14.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: 192.168.1.73 [Msg] Connected to gazebo master @ http://127.0.0.1:11345 [Msg] Publicized address: 192.168.1.73

RandC gravatar imageRandC ( 2018-11-26 02:53:58 -0600 )edit

Anyone? I'm still having trouble...

RandC gravatar imageRandC ( 2018-12-10 02:38:15 -0600 )edit

this remains a problem, the proposed solution does not solve it

mhubii gravatar imagemhubii ( 2019-04-05 04:39:40 -0600 )edit
0

answered 2023-03-12 12:02:47 -0600

I had the same problem. I am using a laptop with dual graphics card (intel and nvidia) and running gazebo 11 on ubuntu 20.04.

Sun light had no effect, ground was dark and objects had no shadows.

When I was trying to figure if everything is alright with my graphics cards I found that the nvidia x server software is not detecting my nvidia card.

I then changed the nvidia driver from nvidia driver (open kernel), first option in the image below to the one currently selected in the same image, nvidia-driver-525 (proprietary)

I then rebooted my system and everything worked perfectly.

So it could be a driver issue and I hope anyone else still having the same problem will be able to solve it.

image description

edit flag offensive delete link more
0

answered 2022-03-25 17:38:04 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I'm having same problem with gazebo11 and ubuntu 18.04. However, when I upgrade to 20.04, the problem has disappeared for some reasons I'm not aware of. Unfortunately, I had to downgrade ubuntu because I'm using another device that is not compatible with 20.04. But at least, the graphics card wasn't the problem which in my case is amd graphics card.

edit flag offensive delete link more
0

answered 2021-02-22 17:04:37 -0600

I had same problem. I reinstall xorg software and it fix the problem with shadows in gazebo.

    sudo apt-get install xserver-xorg-core

remove xorg-core hwe 18 automatically, but you can continue using your desktop environment. And later

    sudo apt-get install xserver-xorg-core-hwe-18.04 
    sudo apt-get install xserver-xorg-input-all-hwe-18.04

I don't know why it's worked for me. Proofed in Ubuntu 18.04, gazebo 11.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2018-11-20 04:22:01 -0600

Seen: 9,804 times

Last updated: Mar 25 '22