Cannot maintain texture when generating instanceable USD from URDF files

Hello, community!

I have some trouble keeping the texture for instanceable USD objects generated from their URDF files. (8.7 MB)

For an object like the above one, I have its visual and collision meshes as well as textures (stored as file material_0.*) and the URDF file. I can successfully generate a USD stage containing this object with textures using following code (the generated USD file is stored in usd_dest_path/model.usd)

from omni.isaac.kit import SimulationApp
simulation_app = SimulationApp({"headless": True})

from omni.isaac.core import World
from omni.isaac.core.utils.extensions import get_extension_path_from_name
from omni.isaac.urdf import _urdf
from omni.isaac.core.utils.stage import save_stage
import omni.kit.commands

world = World()

# Acquire the URDF extension interface
urdf_interface = _urdf.acquire_urdf_interface()
# Set the settings in the import config
import_config = _urdf.ImportConfig()
import_config.make_instanceable = False
import_config.merge_fixed_joints = False
import_config.convex_decomp = False
import_config.import_inertia_tensor = True
import_config.fix_base = False
import_config.make_default_prim = True
import_config.self_collision = False
import_config.default_drive_type = _urdf.UrdfJointTargetType.JOINT_DRIVE_POSITION

result, prim_path = omni.kit.commands.execute("URDFParseAndImportFile", urdf_path='model.urdf', import_config=import_config, dest_path='usd_dest_path/model.usd')


However, when I try to generate the instanceable USD file, I have tried either setting make_instanceable to True in this code or using the convert_asset_instanceable from this doc to convert the above generated model.usd (which generates the file usd_dest_path/model_instanceable_withxform.usd), the texture just not display. More wierdly, when using the method of converting asset to instanceable, usd_dest_path/model_instanceable_withxform_meshes.usd (which is the reference of the instanceable USD) does contain the texture.

Am I missing something here?

Hi - Sorry for the delay in the response. Let us know if you still having this issue with the latest Isaac Sim 2022.2.1 release.

It does not seem to be resolved. I am facing the same issue with Sim 2022.2.1
The generated

.usd does not have any textures though the other file instanceable_meshes.usd does show the textures when open on the stage.

Here are the original USD used for conversion and the generated files. I just renamed the “instanceable_meshes.usd” to “visuals.usd” and updated the reference to it (8.1 MB)

This is how it looks


Hi @nanaki07 - Maybe this thread will help adjust the opacity of the material. Opacity adjustment not working - #4 by samuel.blanchet.2

I don’t think it is related to the opacity of the material.

I get the following warning:

Warning: in _ReportErrors at line 2830 of stage.cpp -- The relationship target </ur5e/Looks/material_Black> from </ur5e/base_link_inertia/visuals_xform/visuals/material_0.material:binding> in layer @omniverse://localhost/Users/cambel/ur5e/ur5e_visuals.usd@ refers to a path outside the scope of the reference from </ur5e/base_link_inertia/visuals_xform>.  Ignoring. (getting targets for relationship </__Master_8/visuals/material_0.material:binding> on stage @omniverse://localhost/Users/cambel/ur5e/ur5e_instanceable.usd@ <0x1a03b6b0>)

My guess is that ur5e_instanceable.usd somehow cannot get the materials from the ur5e_visuals.usd but I don’t know why.

Okay, I found a solution.

The problem is that the material is defined outside the visual Xform.
In the non-instanceable USD the materials are shared and placed in a looks folder. The generated instanceable_meshes USD has the same structure but the reference does not work unless the material is inside the visual Xform that is using it.

Here is my working example: (5.4 MB)

However, it would be great if the convert_asset_instanceable script could automatically copy the materials in their corresponding Xforms.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.