Transparency in Gazebo with XACRO

I tried to display transparent boxes in Gazebo with XACRO. The box_color is rendered properly in RVIZ, however Gazebo/GreyTransparent is only Grey, not transparent in Gazebo.

Is it actually possible to make it transparent in Gazebo with XACRO?

<xacro:macro name="box" params="name parent trans rot">
    <xacro:macro name="box">
        <origin rpy="0 0 0" xyz="0 1.9 1.6"/>
            <box size="3.00 0.100 3.200"/>

    <xacro:macro name="box_color">
        <material name="box_color">
            <color rgba=".6 .2 .4 0.5"/>

    <link name="${name}">


        <xacro:cylinder_inertial radius="0.4" length="0.1" mass="1">
          <origin xyz="0.0 0.0 0.0" rpy="0 0 0" />


    <gazebo reference="${name}">
        <selfCollide> False </selfCollide>

    <!-- JOINT -->
    <joint name="${name}_joint" type="fixed">
        <parent link="${parent}"/>
        <child link="${name}"/>
        <origin rpy="${rot}" xyz="${trans}"/>
    <gazebo reference="${name}_joint">
1 Like