Robotics StackExchange | Archived questions

Ignition Ign-Rendering not showing textures/materials

I have a custom .world file for gazebo, made all the SDF's correctly, works perfectly in Gazebo, runs correctly in gzserver and displays all the materials correctly in gzclient. When editing the example gazebosceneviewer to match my requirements and make a custom visualizer, i noticed that non of the materials were displayed, but they are displayed in gzclient. Experimenting with one of Ignition tutorials and the example worlds (http://gazebosim.org/blog/rendering_abstraction) the materials/colors/textures are loaded correctly, but they are defined differently in the SDF file, as follows.

WORKING (falling_objects.world)

<model name="south_model">
      <pose>0 0 0 0 0 0</pose>
      <static>false</static>
      <link name="south_link">
        <pose>7 0 -2 0 0 0</pose>
        <collision name="south_collision">
          <geometry>
            <sphere>
              <radius>0.75</radius>
            </sphere>
          </geometry>
        </collision>

        <visual name="south_visual">
          <geometry>
            <sphere>
              <radius>0.75</radius>
            </sphere>
          </geometry>
          <material>
            <ambient>0.3 0.0 0.0 1</ambient>
            <diffuse>0.7 0.0 0.0 1</diffuse>
            <specular>0.5 0.5 0.5 1</specular>
          </material>
        </visual>
      </link>
    </model>

NOT WORKING(custom.world)

<model name="RoboCup MSL Ball">
    <static>false</static>
    <link name="ball">
      <inertial>
        <mass>0.43</mass>
        <!-- inertia based on solid sphere 2/5 mr^2 -->
        <inertia>
          <ixx>0,0020812</ixx>
          <iyy>0,0020812</iyy>
          <izz>0,0020812</izz>
          <ixy>0</ixy>
          <ixz>0</ixz>
          <iyz>0</iyz>
        </inertia>
      </inertial>
      <collision name="collision">
        <geometry>
          <sphere>
            <radius>0.11</radius>
          </sphere>
        </geometry>
      </collision>
      <visual name="visual">
        <geometry>
          <sphere>
            <radius>0.11</radius>
          </sphere>
        </geometry>
        <material>
          <script>
            <uri>file://media/materials/scripts/gazebo.material</uri>
            <name>Gazebo/RedBright</name>
          </script>
        </material>
      </visual>
    </link>
  </model>

USING GAZEBO : GZSERVER+GZCLIENT

CUSTOM WORLD

image description

FALLING OBJECTS

image description

USING GZSERVER + CUSTOM OPENGL VISUALIZER

CUSTOM WORLD

image description

FALLING OBJECTS

image description

Also, any hint on why the FPS are so low? Nvidia usage in below 45%, memory below 35% ... Thanks in advance!

Pedro Silva, RoboCup' MSL's MinhoTeam Researcher

Asked by wicked88 on 2016-08-12 11:36:37 UTC

Comments

Answers

Nice to hear that you're trying out ign-rendering. It is still work in progress. Support for parsing material scripts, e.g. Gazebo/RedBright, have not yet been implemented. We hope to get back to working on this project some time in the near future.

Asked by iche033 on 2016-08-15 12:26:37 UTC

Comments

Thank you for the answer !

Yes, i noticed that later on in "TODO" of ign-rendering. I replaced my materials with common color made using ambient, diffuse and specular. Anyways, i still get far lower fps rates than gazebo ... my i use gazebo's API for rendering instead of ignition's ?

Asked by wicked88 on 2016-08-15 13:33:14 UTC

Thank you for the answer !

Yes, i noticed that later on in "TODO" of ign-rendering. I replaced my materials with common color made using ambient, diffuse and specular. Anyways, i still get far lower fps rates than gazebo ... my i use gazebo's API for rendering instead of ignition's ?

Asked by wicked88 on 2016-08-17 06:06:47 UTC