Gazebo | Ignition | Community
Ask Your Question
0

gazebo material not working

asked 2018-05-09 10:23:13 -0500

updated 2018-05-09 10:24:10 -0500

when i use the code:

  <gazebo reference="link_1">
    <material>Gazebo/OrangeTransparent</material>
  </gazebo>

it shows the color of the link. but when i use below code it doesn't:

  <gazebo reference="link_1">
    <material>
  <ambient>1 0.5088 0.0468 1</ambient>
  <diffuse>0.46 0.46 0.46 1.0</diffuse>
  <specular>0.5 0.5 0.5 128</specular>
  <emissive>0.46 0.46 0.46 1.0</emissive>
</material>
  </gazebo>

i'm using gazebo 9, ros kinetic. and i'm using stl mesh.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2018-05-09 10:40:17 -0500

You have to have an additional visual tag:

<gazebo reference="link_1">  
  <visual>  
    <material>  
      <ambient>1 0.5088 0.0468 1</ambient>  
      <diffuse>0.46 0.46 0.46 1.0</diffuse>  
      <specular>0.5 0.5 0.5 128</specular>  
      <emissive>0.46 0.46 0.46 1.0</emissive>  
    </material>  
  </visual>  
</gazebo>

Also see:
http://answers.gazebosim.org/question...

edit flag offensive delete link more
0

answered 2018-05-09 10:34:44 -0500

after using <visual> tag color came:

<gazebo reference="link_1">  
  <visual name="x">  
    <material>  
      <ambient>0.19225 0.19225 0.19225 1.0</ambient>  
      <diffuse>0.50754 0.50754 0.50754 1.0</diffuse>  
      <specular>0.508273 0.508273 0.508273 1.0</specular>  
      <emissive>0.0 0.0 0.0 0.0</emissive>  
    </material>  
  </visual>  
</gazebo>
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-05-09 10:23:13 -0500

Seen: 1,386 times

Last updated: May 09 '18