Possibly your STL model does not have uv coordinates, try this
0.0 0.0 0.0
0 0 0
true
0.0 0.0 0.0
90.0 0.0 90.0
true
false
0.05
2000.0
100000000.0
1.0
1.0 1.0 1.0
/home/patrickm/dev/ros/ros_tutorials/my_robot/objects/mesh_full.stl
*true*
0.001 0.001 0.001
Gazebo/RustySteel
/home/patrickm/dev/ros/ros_tutorials/my_robot/objects/mesh_full.stl
Let me know if that helps.
thanks,
John
On Fri, Oct 22, 2010 at 7:53 AM, Patrick McMichael
wrote:
> Hello,
>
> I apologize beforehand if this question has already been asked and
> answered -- I did not find it in my search(es).
>
> I've been using ROS for a little while now and am trying to set up my
> own world -- things are going pretty well but I keep being thwarted by
> the material constructs in gazebo.
>
> Is there a tutorial somewhere for how to setup your own materials, or
> how to get the built-in materials to use the textures they mention. For
> example, in `rospack find
> gazebo`/gazebo/share/gazebo/Media/materials/scripts/Gazebo.materials
> there is a material called "Gazebo/RustySteel" defined like this:
>
> material Gazebo/RustySteel
> {
> technique
> {
> pass
> {
>
> texture_unit
> {
> texture RustySteel.jpg
> }
> }
> }
> }
>
> I can't seem to find any description on what these things mean, really.
> The texture RustySteel.jpg resides in the `rospack find
> gazebo`/gazebo/share/gazebo/Media/materials/textures directory. However
> when I try to load this into my own .model file like this:
>
>
>
>
> 0.0 0.0 0.0
> 0 0 0
> true
>
> 0.0 0.0 0.0
> 90.0 0.0 90.0
> true
> false
> 0.05
>
> 2000.0
> 100000000.0
> 1.0
> 1.0 1.0 1.0
>
> /home/patrickm/dev/ros/ros_tutorials/my_robot/objects/mesh_full.stl
>
> 0.001 0.001 0.001
> Gazebo/RustySteel
>
> /home/patrickm/dev/ros/ros_tutorials/my_robot/objects/mesh_full.stl
>
>
>
>
>
> ... it just gives me a flat, shadedless brown (where it gets the brown
> from I don't know)
>
> This file is loaded into the world in my launch file like this:
>
>
> args="-gazebo -param mesh_skeleton -x 6.917 -z 1.849 -model
> mesh_skeleton" respawn="false" output="screen" />
>
> I tried adding the lines
>
>
>
> and
>
>
>
>
>
> to my package's manifest.xml file, but they didn't help anything.
> Besides, the flat colors themselves work ok (although they too are
> always flat ambient and don't seem to pay any attention to the shading
> model or diffuse, specular or any other components).
>
> Any ideas what I might be doing wrong?
>
> Thanks,
>
> Patrick
> _______________________________________________
> ros-users mailing list
> ros-users@code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>