Gazebo resource setup for C-Turtle and later.
Starting with C-Turtle, gazebo will no longer require environment variables: LD_LIBRARY_PATH, GAZEBO_MEDIA_PATH and OGRE_RESOURCE_PATH. We are switching to using pluginlib to setup the corresponding resource variables.
Ogre Resource Path
Previous to C-Turtle release, you need to specify the path to ogre library files either by putting it in .gazeborc or specifying it in the environment variable OGRE_RESOURCE_PATH.
<?xml version="1.0"?> <gazeborc> <ogrePath>/u/hsu/projects/cturtle_wg_all/stacks/visualization_common/ogre/ogre/lib/OGRE</ogrePath> </gazeborc>
Gazebo Media Path
Gazebo automatically looks in subdirectory Media/* for resource files, e.g.:
Media/models - model mesh files
Media/materials/textures - ogre texture files
Media/materials/scripts - ogre material scripts
Media/materials/programs - ogre shading programs
Previous to C-Turtle release, you need to specify the path to Media directory either by putting it in ~/.gazeborc
<?xml version="1.0"?> <gazeborc> <gazeboPath>/u/hsu/projects/cturtle_wg_all/stacks/simulator_gazebo/gazebo/gazebo/share/gazebo</gazeboPath> </gazeborc>
or by specifying it in the environment variable GAZEBO_RESOURCE_PATH. For example:
<param name="/use_sim_time" value="true" /> <node name="gazebo" pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/empty.world" respawn="false" output="screen"> <env name="GAZEBO_RESOURCE_PATH" value="$(find your_package_containing_a_Media_directory)" /> </node>
Gazebo Plugins Path
Previous to C-Turtle release, you have to specify the plugin library locations in environment variable LD_LIBRARY_PATH. For example, if the plugin library is located in gazebo_plugins/lib/libgazebo_ros_myplugin.so, you have to include the following env tag in your gazebo node launch script:
<node name="gazebo" pkg="gazebo" type="gazebo" args="$(find gazebo_worlds)/worlds/empty.world" respawn="false" > <env name="LD_LIBRARY_PATH" value="$(find gazebo_plugins)/lib:$(optenv LD_LIBRARY_PATH)" /> </node>