0
$\begingroup$

Gazebo Answers logo

I created a robot mesh in Blender, and now I want to import it in Gazebo. The problem is that, when I insert the model in Gazebo, the shape is good, but it is completely black, altought it had different colours in Blender. To color the object in Blender, I added some new materials. The result of exporting to collada was just robot.dae file. Maybe there should be some other files representing materials? The part of the SDF that imports mesh looks like this:

<geometry>
   <mesh><uri>file://robot.dae</uri></mesh>
</geometry>

...for both visual and collision tag.


Originally posted by bot on Gazebo Answers with karma: 46 on 2013-06-01

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

Take a look in ~/.gazebo/ogre.log. There are probably errors that say a material cannot be found.

Gazebo will search for materials in all paths listed in GAZEBO_RESOURCE_PATH. It's important to note that for each path listed in GAZEBO_RESOURCE_PATH, gazebo will search in the media/materials/textures subdirectory.

For example, if GAZEBO_RESOURCE_PATH=/usr/local/share/gazebo-1.8. The material texture files should be in /usr/local/share/gazebo-1.8/media/materials/textures.

You should probably just make a model, which has a self-contained directory struture for all meshes, materials, and SDF files. See here, and these examples.


Originally posted by nkoenig with karma: 7676 on 2013-06-06

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.