Robotics StackExchange | Archived questions

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

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 ?

Asked by Yajing Wang on 2016-05-27 02:31:03 UTC

Comments

Answers

You can add a texture to a collada mesh.

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

Asked by nkoenig on 2016-05-27 09:43:35 UTC

Comments

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.

Asked by Yajing Wang on 2016-05-27 11:02:25 UTC

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.

Asked by nkoenig on 2016-05-27 11:06:25 UTC

I get it. Thanks so much for the help.

Asked by Yajing Wang on 2016-05-27 11:11:16 UTC