Hi all, I am trying to build a ground plan with a road texture. I would like also update this texture at runtime during the simulation (I don't know if it is possible and is actually an other problem). I followed 1 "tutorial": http://answers.gazebosim.org/question/4761/how-to-build-a-world-with-real-image-as-ground-plane/ and then a second to correct a possible error: http://answers.gazebosim.org/question/7922/ground-plane-texture-image/
But for me doesn't work anymore. I have no error but I see a yellow and gray plane that is not what i want. I organized the files as described in the tutorials. The files that I have are: model.sdf
<?xml version="1.0"?>
<sdf version="1.4">
<model name="my_ground_plane">
<static>true</static>
<link name="link">
<collision name="collision">
<geometry>
<plane>
<normal>0 0 1</normal>
<size>100 100</size>
</plane>
</geometry>
<surface>
<friction>
<ode>
<mu>100</mu>
<mu2>50</mu2>
</ode>
</friction>
</surface>
</collision>
<visual name="visual">
<cast_shadows>false</cast_shadows>
<geometry>
<plane>
<normal>0 0 1</normal>
<size>10 10</size>
</plane>
</geometry>
<material>
<script>
<uri>model://my_ground_plane/materials/scripts</uri>
<uri>model://my_ground_plane/materials/textures/MyImage.png</uri>
<name>my_ground_plane/Image</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
model.config:
<model>
<name> My Ground Plane </name>
<version> 1.0 </version>
<sdf version="1.5">model.sdf </sdf>
<description>
My textured ground plane.
</description>
</model>
my_ground_plane.material
material my_ground_plane/Image
{
technique
{
pass
{
ambient 1 1 1 1.000000
diffuse 1 1 1 1.000000
specular 0.03 0.03 0.03 1.000000
emissive 0.900000 0.900000 0.900000 1.000000
texture_unit
{
texture floor.png
}
}
}
}
Can someone help me. I am really new in Gazebo and I don't know how to approach the problem. Thanks in advance
Originally posted by savaresef on Gazebo Answers with karma: 5 on 2016-06-09
Post score: 0
Original comments
Comment by chapulina on 2016-06-09:
It looks like you copied model.config where the material should go
Comment by savaresef on 2016-06-09:
I don't know if the code that I copied is wrong itself or there are other aspects that I am not catching.
Comment by chapulina on 2016-06-09:
Under my_ground_plane.material you pasted the same code as under model.config, is this really the files you're using or did you make a mistake writing the question?
Comment by savaresef on 2016-06-09:
Was just a mistake. Now it is right, thanks. I have also tried deleting ambient, diffuse, specular and emissive. As the other code it is a copy from the "tutorial" that I posted in the link.