Home | Tutorials | Wiki | Issues
Ask Your Question
1

Importing collada meshes in gazebo

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

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:

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

...for both visual and collision tag.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

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

nkoenig gravatar image

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

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
0

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

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

Comments

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 -0500 )edit
hsu gravatar imagehsu ( 2013-06-05 10:42:20 -0500 )edit

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

ffurrer gravatar imageffurrer ( 2013-06-10 17:57:00 -0500 )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 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

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

Seen: 3,451 times

Last updated: Jun 06 '13