Gazebo | Ignition | Community
Ask Your Question

Colors not shown in Gazebo 5

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

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 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

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

damjan gravatar image

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

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 -0600

Brosseau.F gravatar image

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

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 -0600 )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 -0600 )edit

Question Tools



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

Seen: 3,524 times

Last updated: Apr 19 '17