Gazebo | Ignition | Community
Ask Your Question
0

Gazebo model does not load the materials

asked 2018-10-05 08:34:58 -0600

stevemartinov gravatar image

Hi all. I have created my world using Google Sketchup and saved the materials (jpg format) and .dae file into ~/.gazebo/models/MY_MODEL file. I have configured both model.config and model.sdf files. My model.sdf file is this:

<?xml version="1.0" ?>
<sdf version="1.5">
  <model name="MY_MODEL">
    <link name="link">
      <collision name="collision">
        <geometry>
          <mesh>
            <uri>model://MY_MODEL/meshes/model_d.dae</uri>
          </mesh>
        </geometry>
      </collision>
      <visual name="visual">
        <geometry>
          <mesh>
            <uri>model://MY_MODEL/meshes/model_d.dae</uri>
          </mesh>
        </geometry>
      </visual>
    </link>
  </model>
</sdf>

After that I checked my world using gazebo and importing the newly created model and everything looks fine. But when I try to do the same from other terminal (not from ~/.gazebo/models/MY_MODEL) I do not get the texture/materials of my model, everything is silver. Why is that?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-10-06 08:00:48 -0600

kumpakri gravatar image

updated 2018-10-06 08:02:27 -0600

If you run this command

echo $GAZEBO_MODEL_PATH

in the terminal from which you run Gazebo, what does it say? If there is no ~/.gazebo/models then Gazebo cannot find the folder. Add

 export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:~/.gazebo/models

into your ~/.bashrc file. or export manually every time you want to use it.

edit flag offensive delete link more

Comments

I have added the path to bashrc but I the model I made still has no textures.

stevemartinov gravatar imagestevemartinov ( 2018-10-08 01:13:37 -0600 )edit

Have you sourced the gazebo setup file in the new terminal? source /usr/share/gazebo/setup.sh

kumpakri gravatar imagekumpakri ( 2018-10-08 03:56:53 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-10-05 08:34:58 -0600

Seen: 2,364 times

Last updated: Oct 06 '18