Isaac Sim - How to import USD assets into a scene?

Noobie question. I am struggling on how to add an usd asset into a scene in Isaac Sim via python code. In the default library under /Isaac/Props/Mounts there is an asset called “ur10_mount.usd”, how should the code look like if I tried to add this .usd file?

Here’s how my code looks like now…

def setup_scene(self):
    world = self.get_world()
    world.scene.add_default_ground_plane()

    stand = world.scene.add_usd("ur10_mount.usd")
1 Like

I found a solution

from omni.isaac.core.utils.nucleus import find_nucleus_server
from omni.isaac.core.utils.stage import add_reference_to_stage
import carb

def setup_scene(self):
        world = World.instance()
        result, nucleus_server = find_nucleus_server()
        if result is False:
            carb.log_error("Could not find nucleus server with /Isaac folder")
        usd_path = nucleus_server + "/Isaac/Props/Mounts/ur10_mount.usd"
        stand = add_reference_to_stage(usd_path=usd_path, prim_path="/World/Stand")
1 Like

Thanks for the help, it worked!

I noticed the added asset is down-scaled by a factor of 100, have you encountered this problem? I’ll keep on looking and trying to fix it as for now :)

There are 2 solutions:

  1. Upscale your asset in your usd file and save it
  2. Upscale your prim after add it to the stage (but I don’t recommend, it might doesn’t work or break some physics)
stand.scale = np.array([100, 100, 100])
1 Like

If all of your assets are in meters you can also use
https://docs.omniverse.nvidia.com/py/isaacsim/source/extensions/omni.isaac.core/docs/index.html#omni.isaac.core.utils.stage.set_stage_units

To set the stage units to 1.0 instead of the default of 0.01
And make sure that gravity in the Physics Scene is set accordingly.

We plan to convert all of our sample assets to meters and switch default units to meters in the next major release.

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