Can't load custom assets into ISAAC sim

I am trying to load a custom asset from a python script using SimulationApp. I get the following error on trying to load the custom asset from the localhost:-

2022-09-28 09:25:21 [29,242ms] [Warning] [omni.client.plugin]  Tick: authentication: Discovery(ws://localhost/omni/discovery): Error creating Auth/Credentials search: Not connected
2022-09-28 09:25:21 [29,242ms] [Warning] [omni.client.plugin]  Tick: authentication: Discovery(ws://localhost/omni/discovery): Error creating Auth/Tokens search: Not connected
2022-09-28 09:25:21 [29,242ms] [Warning] [omni.client.plugin]  Tick: authentication: Discovery(ws://localhost/omni/discovery): Error creating Api/Connection search: Not connected
2022-09-28 09:25:21 [29,281ms] [Warning] [omni.usd] Warning: in _ReportErrors at line 2830 of /buildAgent/work/ca6c508eae419cf8/USD/pxr/usd/usd/stage.cpp -- Could not open asset @omniverse://localhost/Projects/Fire_extinguisher_V2.usd@ for reference on prim @anon:0x13745600:World0.usd@,@anon:0x13745750:World0-session.usda@</Replicator/Ref>. (recomposing stage on stage @anon:0x13745600:World0.usd@ <0x13262880>)

2022-09-28 09:25:22 [29,663ms] [Warning] [carb.flatcache.plugin] Type tag does not have a corresponding USD type
2022-09-28 09:25:22 [29,916ms] [Error] [omni.graph.core.plugin] OmniGraph Error: WritePrimAttribute Error: 
	Error in 'pxrInternal_v0_20__pxrReserved__::UsdStage::_SetValueImpl' at line 6028 in file /buildAgent/work/ca6c508eae419cf8/USD/pxr/usd/usd/stage.cpp : 'Empty typeName for </Replicator/Ref.xformOpOrder>'
                 (from compute() at line 208 in /home/ubuntu/.local/share/ov/pkg/isaac_sim-2022.1.0/exts/omni.replicator.core-1.2.0+cp37/omni/replicator/core/ogn/python/_impl/nodes/OgnWritePrimAttribute.py)

The same asset can be dragged and dropped onto a blank scene in Isaac SIM. I would really appreciate some suggestions.

2 Likes

I also have this problem!

@jay.anjankar can you share the usd asset and a minimal python script that reproduces the issue?

What API are you using to load the custom asset?

@jay.anjankar / @leila , as requested by Hammad in previous comment, can you please share the usd asset and minimal python script?

cone.zip (15.7 KB)
custom_assets.py (2.3 KB)
Hi Hammad and rthaker,
This is the script to recreate the issue related to loading of custom assets. The custom asset can be loaded locally (from the Desktop) but it cannot be loaded from inside the local server inside nucleus.

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.

Hi rthaker, I am still facing the issue in 2022.2.1. I can load the assets from my local system (from the Desktop for instance) but am unable to do so from my local Nucleus server.

Hi. Can you try copying the file to local disk and edit this line to the point to a local path?
CONE = 'omniverse://localhost/path_to/traffic_cone.usd'

Hi Sheikh,
I am able to load the assets from my local disk (Desktop). I was wondering if there was a way to add a path to a local host using something similar to find_nucleus_server().

Do you mean to use a local disk path as Isaac Sim default root asset path?
This is feature is not available yet by default. We will work on this for the next version.

No, I would like to load custom assets from my local Nucleus server. I can drag and drop the assets onto Isaac Sim but I am unable to add them via the Python interface.

@oahmed - Can you help with this?

Hello, I have the same probleme running Isaac sim as container. I want to test the offline dataset generation (forklift) by changing the cone in the simulation with a custom usd asset.

I think I understood that all the assets are remote for the container version: “The Isaac Sim docker container does not include Nucleus and will access assets directly from the Cloud by default.”

I changed this part of the code as you mentionned:
def place_cones(): #prefix_with_isaac_asset_server(CONE_URL)
cones = rep.create.from_usd("omniverse://localhost/isaac-sim/standalone_examples/replicator/drone.usd ", semantics=[(“class”, “TrafficCone”)])

But I get the following error:
[Warning] [omni.usd] Warning: in _ReportErrors at line 2830 of /buildAgent/work/ca6c508eae419cf8/USD/pxr/usd/usd/stage.cpp – Could not open asset @omniverse://localhost/isaac-sim/standalone_examples/replicator/drone.usd%20@

Is it doable on the container version?

Hi @jay.anjankar - The error message you are encountering might be an issue with the connection to the Omniverse server. I would suggest few steps for you to follow:

  1. Make sure the Omniverse server is running and accessible from your python script. You can test connection in web browser navigating to the omniverse server’s address (http://localhost:3009)

  2. Ensure that you’re using the correct path to the custom asset in your Python script. The path should be in the format omniverse://localhost/Projects/YourProject/YourAsset.usd. Double-check the project name and asset file name for any typos or inconsistencies.

  3. Verify that you have the necessary permissions to access the custom asset on the Omniverse server. You might need to log in with your Omniverse credentials in your Python script using the omni.client API.

  4. Make sure you’re using the correct API calls to load the custom asset in your Python script. Here’s an example of how to load a custom asset using the SimulationApp API:

from omni.isaac.python_app import OmniKitHelper

# Initialize the SimulationApp
config = {
    "renderer": "RayTracedLighting",
    "headless": True,
    "experience": "isaac-sim",
}
kit = OmniKitHelper(config)

# Load the custom asset
asset_path = "omniverse://localhost/Projects/YourProject/YourAsset.usd"
stage = kit.get_stage()
stage.Open(asset_path)

# Run the simulation for a few frames
for _ in range(10):
    kit.update(1 / 60.0)

# Stop the SimulationApp
kit.shutdown()

Replace YourProject and YourAsset.usd with the appropriate project name and asset file name.

@thealduin64 - It seems like there is an issue with the asset path you are using. The error message indicates that there is an extra space character %20 at the end of the asset path, which might be causing the problem.

Please make sure there are no extra spaces or special characters in the asset path. Update the asset path in your code as follows:

cones = rep.create.from_usd("omniverse://localhost/isaac-sim/standalone_examples/replicator/drone.usd", semantics=[("class", "TrafficCone")])

OK, I don’t think there was a space when i tried it but will double check, so you’re saying It’s not mandatory to create a nucleus with my assets and that I can use the local path, even using the container deployment (as it does not contain any nucleus by default).

Yes, you can use local paths to load assets in Isaac Sim, even when running in a Docker container. However, you need to make sure that the Docker container has access to the local file system where the assets are stored.

When you start the Docker container, you can use the -v option to mount a local directory to a directory in the Docker container. For example:

docker run -v /path/to/local/assets:/assets_in_docker ...

This command mounts the local directory /path/to/local/assets to the directory /assets_in_docker in the Docker container. You can then load assets from the /assets_in_docker directory in your Isaac Sim scripts.

Please note that the local directory should be an absolute path. Also, the Docker container needs to have the necessary permissions to read the files in the local directory.

If you have a lot of assets or if you want to share assets between different machines, using a Nucleus server could be more convenient. But for a small number of assets or for testing purposes, using local paths can be a simpler solution.