Skip to content

Conversation

@ooctipus
Copy link
Collaborator

Description

Replaces import of

try:
import isaacsim.storage.native as nucleus_utils
except ModuleNotFoundError:
import isaacsim.core.utils.nucleus as nucleus_utils
with own utils implemented inside the sim utils folder.

import isaaclab.sim.utils.nucleus as nucleus_utils

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@ooctipus ooctipus changed the title Replaces nucleus_utils with reimplementation as part of IsaacLab [Newton]Replaces nucleus_utils with reimplementation as part of IsaacLab Nov 26, 2025
@ooctipus
Copy link
Collaborator Author

Requires python logging PR merge first

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 26, 2025

Greptile Overview

Greptile Summary

Replaces external IsaacSim nucleus utilities dependency with internal implementation in isaaclab/utils/nucleus.py, removing try-except import blocks from test files.

Critical Issues:

  • All three test files use incorrect import path isaaclab.sim.utils.nucleus but the file is created at isaaclab/utils/nucleus.py - this will cause ModuleNotFoundError at runtime
  • The timeout parameter in check_server() is defined but never used in the function body

Additional Changes:

  • newton_manager.py now sets num_envs attribute on the model after finalization
  • One test file (check_floating_base_made_fixed.py) still uses the old IsaacSim import and wasn't updated

Confidence Score: 0/5

  • This PR cannot be merged - it will break all three updated test files with import errors
  • Score reflects critical import path errors in all three test files that will cause immediate runtime failures. The import path isaaclab.sim.utils.nucleus does not match the file location isaaclab/utils/nucleus.py
  • All test files (check_camera.py, check_legged_robot_clone.py, check_ref_count.py) need import paths corrected before merge. Also check check_floating_base_made_fixed.py which wasn't updated.

Important Files Changed

File Analysis

Filename Score Overview
source/isaaclab/isaaclab/utils/nucleus.py 3/5 New implementation of nucleus utilities to replace IsaacSim dependency; has unused timeout parameter in check_server
source/isaaclab/test/deps/isaacsim/check_camera.py 0/5 Updated import to new nucleus utils; critical issue - import path is incorrect and will cause ModuleNotFoundError
source/isaaclab/test/deps/isaacsim/check_legged_robot_clone.py 0/5 Updated import to new nucleus utils; critical issue - import path is incorrect and will cause ModuleNotFoundError
source/isaaclab/test/deps/isaacsim/check_ref_count.py 0/5 Updated import to new nucleus utils; critical issue - import path is incorrect and will cause ModuleNotFoundError

Sequence Diagram

sequenceDiagram
    participant Test as Test File
    participant NucleusUtils as isaaclab.utils.nucleus
    participant CarbSettings as carb.settings
    participant OmniClient as omni.client
    
    Test->>NucleusUtils: get_assets_root_path()
    NucleusUtils->>CarbSettings: get(DEFAULT_ASSET_ROOT_TIMEOUT_SETTING)
    CarbSettings-->>NucleusUtils: timeout value or None
    NucleusUtils->>CarbSettings: get(DEFAULT_ASSET_ROOT_PATH_SETTING)
    CarbSettings-->>NucleusUtils: default_asset_root
    
    alt skip_check is False
        NucleusUtils->>NucleusUtils: check_server(default_asset_root, "/Isaac", timeout)
        NucleusUtils->>OmniClient: set_hang_detection_time_ms(20000)
        NucleusUtils->>OmniClient: stat(server + path)
        OmniClient-->>NucleusUtils: result, _
        
        alt result == Result.OK
            NucleusUtils->>NucleusUtils: check_server(default_asset_root, "/NVIDIA", timeout)
            NucleusUtils->>OmniClient: stat(server + path)
            OmniClient-->>NucleusUtils: result, _
            
            alt result == Result.OK
                NucleusUtils-->>Test: default_asset_root
            else result != Result.OK
                NucleusUtils-->>Test: raise RuntimeError
            end
        else result != Result.OK
            NucleusUtils-->>Test: raise RuntimeError
        end
    else skip_check is True
        NucleusUtils-->>Test: default_asset_root
    end
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

from PIL import Image, ImageChops
from pxr import Gf, UsdGeom

import isaaclab.sim.utils.nucleus as nucleus_utils
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syntax: incorrect import path - file is at isaaclab/utils/nucleus.py not isaaclab/sim/utils/nucleus.py

Suggested change
import isaaclab.sim.utils.nucleus as nucleus_utils
import isaaclab.utils.nucleus as nucleus_utils

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the import should indeed by isaaclab.utils.nucleus

from isaacsim.core.utils.carb import set_carb_setting
from isaacsim.core.utils.viewports import set_camera_view

import isaaclab.sim.utils.nucleus as nucleus_utils
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syntax: incorrect import path - file is at isaaclab/utils/nucleus.py not isaaclab/sim/utils/nucleus.py

Suggested change
import isaaclab.sim.utils.nucleus as nucleus_utils
import isaaclab.utils.nucleus as nucleus_utils

from isaacsim.core.prims import Articulation
from isaacsim.core.utils.carb import set_carb_setting

import isaaclab.sim.utils.nucleus as nucleus_utils
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syntax: incorrect import path - file is at isaaclab/utils/nucleus.py not isaaclab/sim/utils/nucleus.py

Suggested change
import isaaclab.sim.utils.nucleus as nucleus_utils
import isaaclab.utils.nucleus as nucleus_utils

DEFAULT_ASSET_ROOT_TIMEOUT_SETTING = "/persistent/isaac/asset_root/timeout"


def check_server(server: str, path: str, timeout: float = 10.0) -> bool:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: timeout parameter is defined but never used in the function

Suggested change
def check_server(server: str, path: str, timeout: float = 10.0) -> bool:
def check_server(server: str, path: str) -> bool:

import logging

import carb
import omni.client
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these omni.client imports could also be a problem

from PIL import Image, ImageChops
from pxr import Gf, UsdGeom

import isaaclab.sim.utils.nucleus as nucleus_utils
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like the import should indeed by isaaclab.utils.nucleus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants