Gazebo | Ignition | Community
Ask Your Question
0

Rendering issue with custom collada model

asked 2020-07-13 09:41:59 -0600

R6 gravatar image

Hello,

For the purpose of my simulation, I have created a custom 3D model.

When I start gazebo with my world in my "/usr/share/gazebo-11/worlds" folder:

gazebo test.world

<?xml version="1.0"?>
<sdf version="1.4">
  <world name="default">
    <include>
      <uri>model://ground_plane</uri>
    </include>
    <include>
      <uri>model://sun</uri>
    </include>
    <include>
      <uri>model://my_model</uri>

    </include>
  </world>
</sdf>

The model is loaded but appears entirely black.

image description

When I load the .dae file directly in the world file:

<model name="my_model">
      <static>true</static>
      <link name="body">
        <visual name="visual">
          <geometry>
            <mesh><uri>file://my_model.dae</uri></mesh>
          </geometry>
        </visual>
      </link>
 </model>

The model is invisible, it appears on the left panel under the "models" section but that's it.

However, when I use the same code as above, in a random folder such as Documents, the model is loaded and looks exactly as it should:

image description

My model's folder is located in /usr/share/gazebo-11/models:

my_model/
├── meshes
│   └── my_model.dae
├── model.config
└── model.sdf

Whenever I tried to directly import I made sure the dae file was present in the folder I was calling gazebo from

I am running out of ideas to troubleshoot this issue.. I suspect there is an issue with the paths within my files but I don't know... Does someone have any suggestions ?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2021-05-31 06:52:44 -0600

martinerk0 gravatar image

.dae file = mesh+ texture

model = xml file + config file with all the tags gazebo needs for simulation

put

<include>
    <uri>model://my_model</uri>
    <pose>0 0 0 0 0 0</pose>
</include>

into the world file.

and check that you have correctly set GAZEBO_MODEL_PATH and GAZEBO_RESOURCE_PATH

for example by:

printenv | grep GAZEBO

I suggest separating model directories and mesh directories and add model directory to GAZEBO_MODEL_PATH and and world&mesh directories to GAZEBO_RESOURCE_PATH

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-07-13 08:16:49 -0600

Seen: 173 times

Last updated: Jul 13 '20