Apply normal map shader

asked 2018-10-18 03:21:00 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I noticed in the SDF specification one can add a <shader> tag with type normal_map_tangentspace to a <material> tag. But when I try to load my world file in gazebo 9 (also tried it in 7), the last output I get in the console is waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting.... It will wait forever.

I also made sure that the gazebo_model_path is set up correctly in my package.xml, so the texture file specified in the <normal_map> child tag should get found. It works at least for meshes and material scripts. Here is a snippet from my world file:

    <model name="model">
        <link name="link">               
            <visual name="visual">
                    <shader type="normal_map_tangentspace">

Does anyone have experience with this and knows what I'm missing?

Thanks in advance, David

edit retag flag offensive close merge delete


That console message seems to be coming from ROS and not related to Gazebo's rendering.

chapulina gravatar imagechapulina ( 2018-10-18 12:37:12 -0600 )edit

Also, I'd double-check that you're referring to the correct resource locations, usually you'd have the model name after `model://`

chapulina gravatar imagechapulina ( 2018-10-18 12:38:12 -0600 )edit

I'm pretty confident that the path is correct. I've tested it by using it in the mesh uri as well. The mesh got found after I copied it to the same location as my normal map image. And I double checked its name a 1000 times. I had the hope that the last output would give someone a hint where gazebo or ROS seem to encounter a problem. Sadly I have no other feedback, since there is no exception being thrown or anything. It just works fine as soon I comment out the <shader> tag in my world file.

D4KU gravatar imageD4KU ( 2018-10-22 07:59:07 -0600 )edit