Gazebo | Ignition | Community
Ask Your Question
2

Is it possible to add transparency property to an object? [SOLVED]

asked 2016-09-22 14:37:55 -0600

nico_lauda gravatar image

updated 2016-09-25 15:56:40 -0600

Hi all!

I'm trying to model a glass wall for a robotics cell. Is there a way to set the material's transparency within a urdf model?

Thank you!!!

EDIT:

Thank you Peter, your reply was very helpful. I solved the problem using GreyTransparent.

I have edited my urdf adding the following lines:

<gazebo reference="back_wall1">
    <material>Gazebo/GreyTransparent</material>
</gazebo>

Anyway, I found that there are other colors in gazebo.materials

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2016-09-25 10:22:02 -0600

updated 2021-01-19 09:06:30 -0600

UPDATE:

In gazebo 11 it seems the "a" argument to diffuse and friends don't work. You can still used material scripts, but another option is to use the "transparency" element of "visual"

http://sdformat.org/spec?ver=1.6&elem...

OLD ANSWER

Yes there is. Not sure if there's something within urdf, but it's certainly supported in sdf. In other words, you may have to put it in the <gazebo> tags.

Here's the relavent documentation

I often use <diffuse>, <specular>,<emissive>. Which each take rgba. However, you could also use some of the built in materials:

<material>
  <script>
    <name>Gazebo/BlueTransparent</name>
    <uri>file://media/materials/scripts/gazebo.material</uri>
  </script>
</material>

Finally, you can make your own texture. See ThomasK's excellent answer here:

http://answers.gazebosim.org/question/1500/can-textures-be-added-to-simple-objects-from-my-own-source/

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-09-22 14:37:55 -0600

Seen: 8,733 times

Last updated: Jan 19 '21