Gazebo | Ignition | Community
Ask Your Question

surface material colors from URDF and COLLADA

asked 2013-01-01 04:19:54 -0500

piyushk gravatar image

updated 2013-01-10 00:57:52 -0500

Gazebo 1.2.5 no longer seems to be picking up the material tag from the URDF file. This can be seen through the following commands (from this tutorial on the ROS wiki).

roslaunch gazebo_worlds empty_world.launch
roslaunch gazebo_worlds table.launch

A screenshot can be seen here. I am facing the same problem in my robot models.

On a similar note, I have seen weird behavior in Gazebo from my COLLADA mesh models (this behavior was also similarly weird in Gazebo 1.0 + ROS Fuerte). I would like to use the colors as specified in the mesh file (rviz + RobotModel handle this correctly).

Gazebo seems to start with all the meshes painted grey. If any of the joints move, then the corresponding links seem to alternate between grey and the color as specified by the mesh. A video of this can be seen here.

I am not sure what information will be required to debug this, but I can place it online.

Edit #1:

Replacing the material tag as suggested by the SDF documentation and Nate's answer does not work. I've replace the material tag of all my urdf links with this line from my world file which I know works:

  • Here is the generated urdf after running through xacro: test.urdf
  • Here is the world file I get from gazebo gui (after using save world as):
    • Notice all the material tags from URDF are empty (Search for "material/")
    • All the tags from my world SDF file are fine and rendered correctly.


edit retag flag offensive close merge delete


i'm having this same issue and would like to have the material color from the URDF to be used

davetcoleman gravatar imagedavetcoleman ( 2013-01-02 14:48:38 -0500 )edit

Ditto! I had to go back from ROS Groovy to ROS fuerte for this reason.

Ben B gravatar imageBen B ( 2013-01-07 19:18:01 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2013-01-10 02:56:25 -0500

hsu gravatar image

updated 2013-01-22 10:30:37 -0500

fixed in trunk per commit, will make a groovy release soon.

Update 2012-01-22 simulator_gazebo 1.7.8 with a fix for the materials issue in tutorial is in shadow fixed, should make it out to the public repo soon.

edit flag offensive delete link more

answered 2013-01-09 15:53:28 -0500

nkoenig gravatar image

The URDF in that tutorial is incorrect. It should be:

    <uri>URI of the .material file</uri>
    <name>Name of the material</name>

Look for the SDF documentation for information:

edit flag offensive delete link more


@nkoenig: I just tried this and it does not work. See updated question. I can't see why it should not work if I take a look at, but I am having trouble compiling the simulator_gazebo stack from source to figure it out.

piyushk gravatar imagepiyushk ( 2013-01-10 00:59:44 -0500 )edit

answered 2013-01-10 02:56:46 -0500

hsu gravatar image

fixed in trunk per commit, will make a groovy release soon.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2013-01-01 04:19:54 -0500

Seen: 2,791 times

Last updated: Jan 22 '13