Gazebo loading custom texture
How to load custom texture through launch file? I created new directories space in path ~/models
.
Dir tree:
-models
--media
---materials
----scripts
-----gazebo.material
----textures
-----texture_01.jpg
World file:
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Texture_01</name>
</script>
</material>
Launch file:
<include file="$(find test_package)/launch/empty_world.launch">
<arg name="verbose" value="true"/>
<arg name="world_name" value="$(find test_package)/worlds/test.world"/>
</include>
Where and how to pass environments variable in my without changing empty_world.launch
?
<env name="GAZEBO_MODEL_PATH" value="$(find test_package)/models"/>
<env name="GAZEBO_RESOURCE_PATH" value="$(find test_package)/media/materials"/>
Putting them in my launch file doesn't work. Typing export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/models/
and export GAZEBO_RESOURCE_PATH=$GAZEBO_RESOURCE_PATH:~/models/media/materials/
also doesn't work. My objects stays white without any texture.