IsaacSim URDF Loader doesn't load robot texture

Isaac Sim Version

4.2.0

Operating System

Ubuntu 22.04

GPU Information

  • Model: GeForce RTX 2070
  • Driver Version: 550.127.08

Render Texture with URDF model

Detailed Description

I am using your example here to load the URDF model using the python API, however I can’t load the texture! I also tried un-commenting the part with dist_path but I get an error! the documentation is not clear to me, should I create a USD file?? or will it be created automatically by the importer? can you please give an example on how to load the texture? thanks

        urdf_interface = _urdf.acquire_urdf_interface()
        # Set the settings in the import config
        import_config = _urdf.ImportConfig()
        import_config.merge_fixed_joints = False
        import_config.convex_decomp = False
        import_config.fix_base = True
        import_config.make_default_prim = False
        import_config.self_collision = True #
        import_config.create_physics_scene = False
        import_config.import_inertia_tensor = True # 
        import_config.default_drive_strength = 1047.19751
        import_config.default_position_drive_damping = 52.35988
        import_config.default_drive_type = _urdf.UrdfJointTargetType.JOINT_DRIVE_POSITION
        import_config.distance_scale = 1
        import_config.density = 0.0

        dest = "/tmp/robot_name.usd"
        status, robot_prim_path = omni.kit.commands.execute(
            "URDFParseAndImportFile",
            urdf_path=urdf_path,
            import_config=import_config,
            get_articulation_root=False,
            dest_path=dest
        )
        #
        current_stage = get_omniverse_stage()
        robot_prim_path = omni.usd.get_stage_next_free_path(
            self.world.scene.stage, str(current_stage.GetDefaultPrim().GetPath()) + robot_prim_path, False
        )
        robot_prim = self.world.scene.stage.OverridePrim(robot_prim_path)
        robot_prim.GetReferences().AddReference(dest)
``
### Steps to Reproduce
1.  use code from [example here](https://docs.omniverse.nvidia.com/isaacsim/latest/advanced_tutorials/tutorial_advanced_import_urdf.html#importing-urdf-using-python)
2. un-comment the commented `dist_path` part.
3. run

### Error Messages

´´´bash
Warning: in _ReportErrors at line 2890 of /builds/omniverse/usd-ci/USD/pxr/usd/usd/stage.cpp -- In </robot_name>: Unresolved reference prim path @/tmp/robot_name.usd@<defaultPrim> introduced by @anon:0x55dbf7d4bb70:World0.usd@</robot_name> (recomposing stage on stage @anon:0x55dbf7d4bb70:World0.usd@ <0x55dbf53c1ae0>)
´´´
and I don't see neither the robot, nor the texture!

please move to 4.5. since we have improved the urdf importer

@belal.hmedan i am just another user, but based on your code snippet, it doesn’t seem like you are setting the default prim, which may be an issue. could you try setting it to true to see if anything else changes? but it may be a good idea to switch to 4.5 if it’s feasible for you since there’s been some updates made to the URDF importer.

After this update I get an error:

from omni.importer.urdf import _urdf
2025-02-03 15:14:16 [60,401ms] [Error] [omni.kit.app._impl] [py stderr]: 
ModuleNotFoundError: No module named 'omni.importer'

seems like the documentation is not updated to the 4.5.0 version !

The new document is here: What Is Isaac Sim? — Isaac Sim Documentation

1 Like