How to add new materials to gazebo 1.9.5? [closed]
Ok, here is the issue:
I needed to include some custom-made material in Gazebo 1.9.5, so I added to my bashrc the following line: export GAZEBO_RESOURCE_PATH=~/home/user/user_gazebo_pkg/media:${GAZEBO_RESOURCE_PATH}.
Then, when I try to run gazebo, the following error occurs:
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 /build/buildd/ogre-1.7.4+dfsg1/OgreMain/src/OgreSceneManager.cpp (line 5833)
Someone else having this issue? Is it forbidden to set GAZEBORESOURCEPATH manually? This is issue is also present in version 2.2!
============================UPDATE==============================
Ok, sourcing the setup.sh from /usr/share/gazebo-1.9 worked, the Ogre_Exception dissappeared. My initial problem remains, the materials could not be resolved: could not load material...
I set the resource path like I've specified earlier:
GAZEBO_RESOURCE_PATH=~/home/user/user_gazebo_pkg/media:${GAZEBO_RESOURCE_PATH}
Inside the media folder i've got materials->scripts and textures folders, where I copied the files I intend to use.
===============================SOLVED=========================
I changed GAZEBO_RESOURCE_PATH=~/home/user/user_gazebo_pkg/media:${GAZEBO_RESOURCE_PATH}
to: GAZEBO_RESOURCE_PATH=~/home/user/user_gazebo_pkg:${GAZEBO_RESOURCE_PATH}
and now it works !