Home | Tutorials | Wiki | Issues
Ask Your Question

Importing collada meshes in gazebo

asked 2013-06-01 09:12:35 -0600

bot gravatar image

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:


...for both visual and collision tag.

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2013-06-06 12:54:48 -0600

nkoenig gravatar image

updated 2013-06-06 12:57:13 -0600

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 GAZEBORESOURCEPATH. 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.

edit flag offensive delete link more

answered 2018-10-25 16:05:48 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Did you find the solution to this problem? The same happens to me, when I export to Collada file, only the .dae file is created and I don't know what happens with the textures. Thank you!

edit flag offensive delete link more

answered 2013-06-03 21:57:13 -0600

ffurrer gravatar image

I guess you can check your robot.dae file (look at it in a text editor) and check for file names or materials that you used and most likely you will need to copy the missing materials or models to the model folder.

let me know if that works.

edit flag offensive delete link more


The problem is that i dont know where those materials are saved. There is a part of dae which is referencing materials, but I still cant tell where they are saved. I will edit my post later with that part. Thank you for your answer!

bot gravatar imagebot ( 2013-06-05 05:52:18 -0600 )edit
hsu gravatar imagehsu ( 2013-06-05 10:42:20 -0600 )edit

@bot, did you figure out what your problem was?

ffurrer gravatar imageffurrer ( 2013-06-10 17:57:00 -0600 )edit

Change the materials settings worked fine for me, would be great a tutorial about how to create a model for gazebo, with best practices for materials, mesh reduction etc

Martí Morta - IRI gravatar imageMartí Morta - IRI ( 2013-11-05 05:18:33 -0600 )edit
Login/Signup to Answer

Question Tools


Asked: 2013-06-01 09:12:35 -0600

Seen: 3,638 times

Last updated: Jun 06 '13