Import material defined in URDF

I would like to have the material imported together with the meshes from an .urdf file. The material is a simple color but the meshes are white.
I am pretty much in the same situation as described here:

but I am not using Isaac Gym, rather Isaac Sim, version 2022.1.1.
Is the material import unsupported in this version?

Hi @michal.stanik - I would suggest you to try the latest Isaac Sim 2022.2.1 release instead of older Isaac Sim 2022.1.1.

Let us know if you still have issue with the latest release.

I do not want to migrate the whole project to Isaac Sim 2022.2.1 because it would likely break a ton of other things, fixing which I do not want to spend hours.

Is it not possible to import URDF material in 2022.1.1?

Hello! yes - it should be possible to import materials defined in the URDF as you describe. Try running the test_urdf_advanced to verify. It should import the following:

To run tests in the active isaac sim, go to window->Extensions and enable omni.kit.window.tests. Then to to Window/Test Runner, and filter by URDF, and click on the run next to the test_urdf_avanced

The test Runner did not find any tests and except for the buttons and text field it is empty.

interesting. If you navigate to the urdf importer extension folder, under the data folder you should find the urdf_advanced.urdf file. could you try importing it manually and let me know the results?

EDIT: also - that was imported using 2022.2.1.

one thing to note as well is that imports made on 2022.2.1 should be backwards compatible with 2022.1.1, so if you can get the import working correctly on 2022.2.1 you can use that in the earlier version. We highly recommend you update to latest, though, as there are performance and other improvements that you could benefit in the long run.

The file test_advanced.urdf imported correctly but I checked the difference between it and my URDF file. The problem is that the material needs to be defined like this (outside of the link definitions):

    <material name="yellow">
      <color rgba="1.0 0.61 0.0 1.0"/>
    </material>
    <link name="base_link">
      <visual>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
          <mesh filename="base_link.stl"/>
        </geometry>
        <material name="yellow"/>
      </visual>
      ...

and not directly inside the link:

    <link name="base_link">
      <visual>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
          <mesh filename="base_link.stl"/>
        </geometry>
        <material name="yellow">
          <color rgba="1.0 0.61 0.0 1.0"/>
        </material>
      </visual>
      ...
1 Like