반응형
# Problem
When I execute below command, I got a Error:
$ ros2 launch gazebo_sfm_plugin cafe_ros2.launch.py
...
[gzserver -1] [Err] [RTShaderSystem.cc:480] Unable to find shader lib. Shader generating will fail. Your GAZEBO_RESOURCE_PATH is probably improperly set. Have you sourced <prefix>/share/gazebo/setup.bash?
# Solution
$ ls /usr/share/ | grep gazebo
gazebo
gazebo-11
# You need to change the gazebo version to match what you have installed
$ export GAZEBO_RESOURCE_PATH=$GAZEBO_RESOURCE_PATH:/usr/share/gazebo-11
Additional Information: Environment Variables
Gazebo uses a number of environment variables to locate files, and set up communications between the server and clients. Default values that work for most cases are compiled in. This means you don't need to set any variables.
Here are the variables:
- GAZEBO_MODEL_PATH: colon-separated set of directories where Gazebo will search for models
- GAZEBO_RESOURCE_PATH: colon-separated set of directories where Gazebo will search for other resources such as world and media files.
- GAZEBO_MASTER_URI: URI of the Gazebo master. This specifies the IP and port where the server will be started and tells the clients where to connect to.
- GAZEBO_PLUGIN_PATH: colon-separated set of directories where Gazebo will search for the plugin shared libraries at runtime.
- GAZEBO_MODEL_DATABASE_URI: URI of the online model database where Gazebo will download models from.
These defaults are also included in a shell script:
source <install_path>/share/gazebo/setup.sh
If you want to modify Gazebo's behavior, e.g., by extending the path it searches for models, you should first source the shell script listed above, then modify the variables that it sets.
# Reference
- [Err] [RTShaderSystem.cc:489] Unable to find shader lib. Shader generating will fail #177: https://github.com/PX4/PX4-Avoidance/issues/177
- [Git] DrawingProcess/gazebo_sfm_plugin : https://github.com/DrawingProcess/gazebo_sfm_plugin
반응형