Robotics StackExchange | Archived questions

Error [RTShaderSystem.cc:408] Unable to find shader lib.

When I run gazebo, prompt the error:

Error [RTShaderSystem.cc:408] Unable to find shader lib.Shader generating will fail.terminate called after throwing an instance of 'Ogre::ItemIdentityException'  what():  OGRE EXCEPTION(5:ItemIdentityException): Cannot locate material called 'Gazebo/shadow_caster' in SceneManager::setShadowTextureCasterMaterial at /home/dabing64ub/programfiles/ogre_src_v1-7-4/OgreMain/src/OgreSceneManager.cpp (line 5833)

I compile gazebo from source.thanks~

OS: ubuntu 12.04.4 64bit
Graphics card:GetForce GTX 660

Asked by Sam on 2014-02-20 09:21:52 UTC

Comments

Answers

Do you have glx enabled? Try running this command:

glxinfo | grep rendering

The output should have the following line:

direct rendering: Yes

If the result is No, then you should install the nvidia drivers using the ubuntu package manager.

Asked by nkoenig on 2014-02-20 11:33:30 UTC

Comments

I have the exact same problem, also on ubuntu 12.04. I installed from binaries, and manually set the OGRE_RESOURCE_PATH to /usr/lib/x86_64-linux-gnu/OGRE-1.7.4/ . The output of the command is "direct rendering: Yes" . Any other suggestions for what we might try out?

Asked by SimonHarst on 2014-02-26 06:24:38 UTC

Check the answer with the copying the media and worlds file

Asked by AndreiHaidu on 2015-08-19 09:08:47 UTC

While testing the heightmap support for Gazebo I found this same error. I observed that the problem is fixed if before running gazebo I just source the /usr/share/gazebo/setup.sh.

In fact, the line that is fixing the issue is:

export GAZEBO_RESOURCE_PATH=/usr/share/gazebo-5.1:/usr/share/gazebo_models:${GAZEBO_RESOURCE_PATH}

Asked by Jose Luis Rivero on 2015-04-16 17:53:35 UTC

Comments

I am a newbie concerning gazebo and linux so pardon me for my next question. Where can I find the usr/share/gazebo directory? The only directory I found that contains a setup.sh file is in this path: /opt/ros/indigo. By the way I'm using gazebo 2.2.

Asked by Haz88 on 2015-04-24 09:13:38 UTC

The setup.sh file should be provided by the gazebo package. You can check it with the command dpkg -l gazebo | grep setup.sh.

Asked by Jose Luis Rivero on 2015-04-24 09:26:04 UTC

Now I get this comment: dpkg -l gazebo | grep setup.sh.: command not found

Asked by Haz88 on 2015-04-24 09:41:19 UTC

Are you on Debian/Ubuntu? dpkg should be installed by default. How did you installed gazebo? What is the output of find /usr -name setup.sh?

Asked by Jose Luis Rivero on 2015-04-24 09:49:18 UTC

Hi, I'm using Ubuntu as my operating system. I have installed gazebo via the tutorial in the gazebosim web site(http://gazebosim.org/tutorials?tut=ros_installing&cat=connect_ros). By the way, in the mean time, I have managed to operate the gazebo simulator as standalone, still without succeeding to launch the empty world or any other world launch file. In addition I can't move a turtlebot robot I placed with the teleop keyboard( typing roslaunch turtlebot_teleop keyboard_teleop.launch).

Asked by Haz88 on 2015-04-25 16:32:02 UTC

This is the output of the find command: /usr/share/gazebo-2.2/setup.sh /usr/share/gazebo/setup.sh.

Asked by Haz88 on 2015-04-25 16:32:29 UTC

This is the output of the find command:

Asked by Haz88 on 2015-04-25 16:32:31 UTC

I had this error on Ubuntu 14.04 after installing Gazebo 5 as per the instructions here: http://gazebosim.org/tutorials?tut=install_ubuntu&cat=install

For me, the install created both /usr/share/gazebo-5.0 and /usr/share/gazebo-5.1. gazebo-5.0 contained the 'media' and 'worlds' directories, which contain the shader stuff it says it cant find. Copying those two folders over to /usr/share/gazebo-5.1 got rid of the error:

sudo cp -r /usr/share/gazebo-5.0/media /usr/share/gazebo-5.1/
sudo cp -r /usr/share/gazebo-5.0/worlds /usr/share/gazebo-5.1/

Asked by jakewins on 2015-05-31 21:07:47 UTC

Comments

This should be marked as the right answer, and maybe a bug report?

Asked by AndreiHaidu on 2015-08-19 09:05:18 UTC

Yes, this's the right answer!

Asked by iceicehyhy on 2015-11-12 12:26:53 UTC