Skip to content

using multiple visual-tags in URDF, but the material-tag of the first one is used for both #1293

@M-Schroeder

Description

@M-Schroeder

I am creating an urdf and want to show 2 meshes for one link. One of them should be transparent and the other one not. My idea was to put both meshes inside their own visual tag and one of them has a material-tag, that defines the transparency. To test it, I modified the following section of this xacro:

    <!-- Base link -->
    <link name="base_link">

        <visual>
            <origin xyz="0 0 0.2" rpy="0 0 0" />
            <geometry>
                <mesh filename="package://agilex_scout_mini_description/meshes/wheel.dae" />
            </geometry>
            <material name="half_transparent">
                <color rgba="0 0 0 0.5"/>
            </material>
        </visual>

        <visual>
            <origin
                    xyz="0 0 0"
                    rpy="1.5707 0 -1.5707" />
            <geometry>
                <mesh filename="package://scout_description/meshes/scout_mini_base_link.dae" />
            </geometry>
        </visual>

        <collision>
            <origin xyz="0 0 0" rpy="1.5707 0 -1.5707" />
          <geometry>
            <mesh filename="package://scout_description/meshes/scout_mini_base_link.dae" />
          </geometry>
        </collision>
    </link>

Not only the first mesh (here wheel.dae) is transparent, but both. If I switch the order, none of them is transparent. Even if I explicitly define a material with <color rgba="0 0 0 1"/> for the second mesh, it stays transparent.

It was tested with ROS2 humble.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions