Isaac sim can not find assets root folder when I use python to start sim

[10.710s] Simulation App Startup Complete
Traceback (most recent call last):
File “/home/ubuntu/Desktop/code/sim_code/test.py”, line 46, in
my_world.scene.add_default_ground_plane()
File “/home/ubuntu/Desktop/app/isaac-smi-4.2.0/standalone/exts/omni.isaac.core/omni/isaac/core/scenes/scene.py”, line 265, in add_default_ground_plane
assets_root_path = get_assets_root_path()
File “/home/ubuntu/Desktop/app/isaac-smi-4.2.0/standalone/exts/omni.isaac.nucleus/omni/isaac/nucleus/nucleus.py”, line 621, in get_assets_root_path
raise RuntimeError(“Could not find assets root folder”)
RuntimeError: Could not find assets root folder

I use the code from Nvidia DOC:
from isaacsim import SimulationApp

simulation_app = SimulationApp({“headless”: False})

from omni.isaac.core.objects import DynamicCuboid
from omni.isaac.sensor import Camera
from omni.isaac.core import World
import omni.isaac.core.utils.numpy.rotations as rot_utils
import numpy as np
import matplotlib.pyplot as plt

my_world = World(stage_units_in_meters=1.0)

cube_2 = my_world.scene.add(
DynamicCuboid(
prim_path=“/new_cube_2”,
name=“cube_1”,
position=np.array([5.0, 3, 1.0]),
scale=np.array([0.6, 0.5, 0.2]),
size=1.0,
color=np.array([255, 0, 0]),
)
)

cube_3 = my_world.scene.add(
DynamicCuboid(
prim_path=“/new_cube_3”,
name=“cube_2”,
position=np.array([-5, 1, 3.0]),
scale=np.array([0.1, 0.1, 0.1]),
size=1.0,
color=np.array([0, 0, 255]),
linear_velocity=np.array([0, 0, 0.4]),
)
)

camera = Camera(
prim_path=“/World/camera”,
position=np.array([0.0, 0.0, 25.0]),
frequency=20,
resolution=(256, 256),
orientation=rot_utils.euler_angles_to_quats(np.array([0, 90, 0]), degrees=True),
)

my_world.scene.add_default_ground_plane()
my_world.reset()
camera.initialize()

i = 0
camera.add_motion_vectors_to_frame()

while simulation_app.is_running():
my_world.step(render=True)
print(camera.get_current_frame())
if i == 100:
points_2d = camera.get_image_coords_from_world_points(
np.array([cube_3.get_world_pose()[0], cube_2.get_world_pose()[0]])
)
points_3d = camera.get_world_points_from_image_coords(points_2d, np.array([24.94, 24.9]))
print(points_2d)
print(points_3d)
imgplot = plt.imshow(camera.get_rgba()[:, :, :3])
plt.show()
print(camera.get_current_frame()[“motion_vectors”])
if my_world.is_playing():
if my_world.current_time_step_index == 0:
my_world.reset()
i += 1

simulation_app.close()

Could you please confirm if you are running the exact code you posted in your message? Additionally, could you share the full command you are using to launch Isaac Sim with Python?

home/ubuntu/Desktop/app/isaac-smi-4.2.0/standalone/python.sh xxx.py

“home/ubuntu/Desktop/app/isaac-smi-4.2.0/standalone” is the path of isaac sim installation.
I still couldn’t solve this problem, I solved it by modifying the source code and specifying my local path.
The specific code is in from omni.isaac.nucleus import nucleus

def get_assets_root_path() → typing.Union[str, None]:
“”"Tries to find the root path to the Isaac Sim assets on a Nucleus server

Raises:
    RuntimeError: if the root path is not found.

Returns:
    typing.Union[str, None]:
        url (str): URL of Nucleus server with root path to assets folder.
        Returns None if Nucleus server not found.
"""

# get timeout
timeout = carb.settings.get_settings()*emphasized text*.get("/persistent/isaac/asset_root/timeout")
if not isinstance(timeout, (int, float)):
    timeout = 10.0

# 1 - Check /persistent/isaac/asset_root/default setting
carb.log_info("Check /persistent/isaac/asset_root/default setting")
**default_asset_root = carb.settings.get_settings().get("/persistent/isaac/asset_root/default")**

** default_asset_root = ‘/home/ubuntu/Desktop/app/isaac-smi-4.2.0/assets/Assets/Isaac/4.2’**

if default_asset_root:
    result = check_server(default_asset_root, "/Isaac", timeout)
    if result:
        result = check_server(default_asset_root, "/NVIDIA", timeout)
        if result:
            carb.log_info("Assets root found at {}".format(default_asset_root))
            return default_asset_root

# 2 - Check root on mountedDrives setting
connected_servers = build_server_list()
if len(connected_servers):
    for server_name in connected_servers:
        # carb.log_info("Found {}".format(server_name))
        result = check_server(server_name, "/Isaac", timeout)
        if result:
            result = check_server(server_name, "/NVIDIA", timeout)
            if result:
                carb.log_info("Assets root found at {}".format(server_name))
                return server_name

# 3 - Check cloud for /Assets/Isaac/{version_major}.{version_minor} folder
cloud_assets_url = carb.settings.get_settings().get("/persistent/isaac/asset_root/cloud")
carb.log_info("Checking {}...".format(cloud_assets_url))
if cloud_assets_url:
    result = check_server(cloud_assets_url, "/Isaac", timeout)
    if result:
        result = check_server(cloud_assets_url, "/NVIDIA", timeout)
        if result:
            carb.log_info("Assets root found at {}".format(cloud_assets_url))
            return cloud_assets_url

raise RuntimeError("Could not find assets root folder")

Please verify if your network can access the default Isaac Sim asset server at the following URL:
http://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/4.2

Hello!

We noticed that this topic hasn’t received any recent responses, so we are closing it for now to help keep the forum organized.

If you’re still experiencing this issue or have additional questions, please feel free to create a new topic with updated details. When doing so, we recommend mentioning or linking to this original topic in your new post—this helps provide context and makes it easier for others to assist you.

Thank you for being part of the NVIDIA Isaac Sim community.

Best regards,
The NVIDIA Isaac Sim Forum Team