Home | Tutorials | Wiki | Issues
Ask Your Question

Colors not shown in Gazebo 5

asked 2016-01-22 10:06:30 -0500

J_Schaefer gravatar image

Hallo Gazebo-Users,

I try to change the color of a Link of a robot. The robot is written in URDF/Xacro. The Link is a Link without a mesh.

In Gazebo 2 it worked using the gazebo-element:

<gazebo reference="link-1">

Now I updated to Gazebo5 and the Link is white.

How can I change the color of the link?

edit retag flag offensive close merge delete


Have you managed to solve this problem? I am encountering it as well. Not just with custom URDFs but the standard world files provided with gazebo

ZhekaS gravatar imageZhekaS ( 2016-05-28 22:40:37 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2017-04-19 15:17:53 -0500

damjan gravatar image

updated 2017-04-19 15:18:43 -0500

I think you might be experiencing this issue.

As described in the link above, you need to remove the name atribute from the visual tag of your link definition.

edit flag offensive delete link more

answered 2016-01-25 01:46:40 -0500

Brosseau.F gravatar image

updated 2016-01-25 01:50:33 -0500

Take a look to these links :



You can change the color with the ambient, diffuse, etc ... tag.

<gazebo reference="your_link_name">
  <visual name="blabla">
      <ambient>1 0 0 1</ambient>
      <diffuse>1 0 0 1</diffuse>
      <specular>0.1 0.1 0.1 1</specular>
      <emissive>0 0 0 0</emissive>
edit flag offensive delete link more


Hello @Brosseau.F, I tried the way you explained but it doesn't work. This works with SDF but the model is in URDF.

J_Schaefer gravatar imageJ_Schaefer ( 2016-01-25 08:16:20 -0500 )edit

Do you have a "/usr/share/gazebo-5/media/materials/scripts/gazebo.material" file? Do you have an error/warning message ?

Brosseau.F gravatar imageBrosseau.F ( 2016-01-25 09:07:15 -0500 )edit
Login/Signup to Answer

Question Tools



Asked: 2016-01-22 10:06:30 -0500

Seen: 724 times

Last updated: Apr 19