gazebosim / gz-rendering

C++ library designed to provide an abstraction for different rendering engines. It offers unified APIs for creating 3D graphics applications.
https://gazebosim.org
Apache License 2.0
56 stars 51 forks source link

OBJ not rendered correctly #46

Closed osrf-migration closed 5 years ago

osrf-migration commented 5 years ago

Original report (archived issue) by Nate Koenig (Bitbucket: Nathan Koenig).


Description

An OBJ file is not rendered correctly using ign-gazebo1.

The model in question is available here.

Steps to Reproduce

  1. Run ign-gazebo using this SDF file:
<?xml version="1.0" ?>
<sdf version="1.6">
  <world name="edgar">
    <plugin
      filename="libignition-gazebo1-physics-system.so"
      name="ignition::gazebo::systems::Physics">
    </plugin>
    <plugin
      filename="libignition-gazebo1-scene-broadcaster-system.so"
      name="ignition::gazebo::systems::SceneBroadcaster">
    </plugin>
    <gui fullscreen="0">
      <!-- 3D scene -->
      <plugin filename="Scene3D" name="3D View">
        <ignition-gui>
          <title>3D View</title>
          <property type="bool" key="showTitleBar">false</property>
          <property type="string" key="state">docked</property>
        </ignition-gui>

        <engine>ogre2</engine>
        <scene>scene</scene>
        <ambient_light>0.4 0.4 0.4</ambient_light>
        <background_color>0.8 0.8 0.8</background_color>
        <camera_pose>-6 0 6 0 0.5 0</camera_pose>
        <service>/world/edgar/scene/info</service>
        <pose_topic>/world/edgar/pose/info</pose_topic>
        <scene_topic>/world/edgar/scene/info</scene_topic>
        <deletion_topic>/world/edgar/scene/deletion</deletion_topic>
      </plugin>

      <!-- World control -->
      <plugin filename="WorldControl" name="World control">
        <ignition-gui>
          <title>World control</title>
          <property type="bool" key="showTitleBar">false</property>
          <property type="bool" key="resizable">false</property>
          <property type="double" key="height">72</property>
          <property type="double" key="width">121</property>
          <property type="double" key="z">1</property>

          <property type="string" key="state">floating</property>
          <anchors target="3D View">
            <line own="left" target="left"/>
            <line own="bottom" target="bottom"/>
          </anchors>
        </ignition-gui>

        <play_pause>true</play_pause>
        <step>true</step>
        <start_paused>true</start_paused>
        <service>/world/edgar/control</service>
        <stats_topic>/world/edgar/stats</stats_topic>

      </plugin>

      <!-- World statistics -->
      <plugin filename="WorldStats" name="World stats">
        <ignition-gui>
          <title>World stats</title>
          <property type="bool" key="showTitleBar">false</property>
          <property type="bool" key="resizable">false</property>
          <property type="double" key="height">110</property>
          <property type="double" key="width">290</property>
          <property type="double" key="z">1</property>

          <property type="string" key="state">floating</property>
          <anchors target="3D View">
            <line own="right" target="right"/>
            <line own="bottom" target="bottom"/>
          </anchors>
        </ignition-gui>

        <sim_time>true</sim_time>
        <real_time>true</real_time>
        <real_time_factor>true</real_time_factor>
        <iterations>true</iterations>
        <topic>/world/edgar/stats</topic>
      </plugin>
    </gui>

    <include>
      <uri>https://fuel.ignitionrobotics.org/1.0/openrobotics/models/edgar </uri>
    </include>
  </world>
</sdf>
  1. Rotate the camera around a bunch until you find the model. It'll look like:

edgar_bad.png

Expected behavior:

Using gazebo10, the model looks correct.

edgar_good.jpg

osrf-migration commented 5 years ago

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


osrf-migration commented 5 years ago

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


looks like it's an ogre2 problem. The mesh works when the engine is ogre

osrf-migration commented 5 years ago

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).


pull request #156

osrf-migration commented 5 years ago

Original comment by Ian Chen (Bitbucket: Ian Chen, GitHub: iche033).