Skip to content

Fixes URDF converter documentation and opening in stage logic for imported assets - #4824

Merged
kellyguo11 merged 1 commit into
isaac-sim:developfrom
kellyguo11:converter-fix
Mar 4, 2026
Merged

kellyguo11 merged 1 commit into
isaac-sim:developfrom
kellyguo11:converter-fix

Conversation

@kellyguo11

Copy link
Copy Markdown
Contributor

Description

Adds documentation update for the command to use the new URDF Importer.
Also fixes the logic to open the stage after running the converter scripts for both URDF and MJCF converters.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

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

@kellyguo11 kellyguo11 changed the title Fix URDF converter documentation and opening in stage logic for imported assets Fixes URDF converter documentation and opening in stage logic for imported assets Mar 4, 2026
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Mar 4, 2026
@greptile-apps

greptile-apps Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates documentation for the URDF Importer 3.0 upgrade and fixes the stage-opening logic in both converter scripts to use omni.usd.get_context().open_stage() instead of the now-removed sim_utils.open_stage(). It also adds a PhysicsCfg preset with a higher gpu_max_rigid_patch_count for the Unitree Go2 rough environment.

  • Critical bug in both converter scripts: import omni.kit.app was removed from the top-level imports of convert_mjcf.py and convert_urdf.py, but omni.kit.app.get_app_interface() is still called inside the GUI branch without a corresponding local import. This will raise an AttributeError at runtime whenever either script is run in GUI or livestream mode — exactly the path this PR aims to fix.
  • Documentation changes (import_new_asset.rst) are accurate and clearly communicate the breaking changes introduced by URDF Importer 3.0 (new output layout, deprecated root_link_name / NaturalFrequencyGainsCfg, removal of dont_collapse tag).
  • Go2 environment config (rough_env_cfg.py) cleanly follows the existing PresetCfg pattern to raise the GPU rigid patch budget, which is a reasonable physics tuning change for a quadruped locomotion task.

Confidence Score: 2/5

  • Not safe to merge — the GUI code path in both converter scripts will crash due to a missing import.
  • The core intent of the PR (fixing the open-stage call) is correct, but the fix is incomplete: import omni.kit.app was dropped from the module-level imports and never re-added as a local import, leaving omni.kit.app.get_app_interface() unreachable at runtime. This directly breaks the feature the PR claims to fix for both URDF and MJCF converters in GUI mode.
  • scripts/tools/convert_mjcf.py and scripts/tools/convert_urdf.py both need import omni.kit.app added inside the if local_gui or livestream_gui block.

Important Files Changed

Filename Overview
scripts/tools/convert_mjcf.py Switches stage opening from sim_utils.open_stage to omni.usd.get_context().open_stage, but removes the top-level import omni.kit.app while still calling omni.kit.app.get_app_interface() — causing a runtime error in GUI mode.
scripts/tools/convert_urdf.py Same fix pattern as convert_mjcf.py with the same missing import omni.kit.app bug — omni.kit.app.get_app_interface() is called without the module being imported.
docs/source/how-to/import_new_asset.rst Documentation updated to reflect URDF Importer 3.0 changes: new output path conventions, deprecated options annotated, and dont_collapse tag removal explained — all consistent with the code changes.
source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/go2/rough_env_cfg.py Adds PhysicsCfg preset with a custom gpu_max_rigid_patch_count and wires it into UnitreeGo2RoughEnvCfg.sim, following the existing PresetCfg pattern used by Go2EventsCfg.

Sequence Diagram

sequenceDiagram
    participant User
    participant Script as convert_urdf.py / convert_mjcf.py
    participant Converter as UrdfConverter / MjcfConverter
    participant OmniUSD as omni.usd
    participant OmniKit as omni.kit.app

    User->>Script: run script (GUI mode)
    Script->>Converter: convert asset → usd_path
    Script->>OmniUSD: import omni.usd (local import)
    Script->>OmniUSD: get_context().open_stage(usd_path)
    Script->>OmniKit: get_app_interface() ❌ NOT IMPORTED
    Note over Script,OmniKit: AttributeError — omni.kit.app was removed<br/>from top-level imports but never re-added locally
    Script->>OmniKit: app.update() loop
Loading

Last reviewed commit: 996c128

Comment thread scripts/tools/convert_mjcf.py Resolved
Comment thread scripts/tools/convert_urdf.py Resolved
@kellyguo11
kellyguo11 merged commit 39d4deb into isaac-sim:develop Mar 4, 2026
6 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant