Gazebo | Ignition | Community
Ask Your Question

Add color materials to my urdf models (including Collada meshes).

asked 2016-05-27 02:31:03 -0500

this post is marked as community wiki

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

How to add color to Collada meshes ? Since in urdf files, the color I set in SketchUp dose not work at all, I want to use the same way of adding color to a box in .gazebo (xacro) file to the dae mesh: <gazebo reference="link_name"> <material>Gazebo/Red</material> </gazebo> where the link_name refers to the link I uses meshes, but I failed.

Could anyone please tell how to import the color from SketchUp to urdf ? Or how to rewrite the color again successfully ? Is there something wrong with my file ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-05-27 09:43:35 -0500

nkoenig gravatar image

You can add a texture to a collada mesh.

In SDF you can use the following: <material> <script> <name>Gazebo/WoodPallet</name> </script> </material>

edit flag offensive delete link more


About adding texture to a collada mesh, do you mean in URDF ? If so, could you please further explain the usage for me? I have worked with sdf to create my model successfully before, and are quite familiar with the methods of using materials and meshes in it. But lately I turned to urdf, I did not find tutorials teaching this part, or some ambiguous.

Yajing Wang gravatar imageYajing Wang ( 2016-05-27 11:02:25 -0500 )edit

You can add a texture to a collada mesh using a tool like Blender. The texture would live in the collada mesh, not in urdf.

nkoenig gravatar imagenkoenig ( 2016-05-27 11:06:25 -0500 )edit

I get it. Thanks so much for the help.

Yajing Wang gravatar imageYajing Wang ( 2016-05-27 11:11:16 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-05-27 02:31:03 -0500

Seen: 2,496 times

Last updated: May 27 '16