Skip to content

[NEWTON] Fixes more xyzw issues in core - #4416

Merged
kellyguo11 merged 6 commits into
isaac-sim:dev/newtonfrom
ooctipus:newton/fix_xyzw
Jan 20, 2026
Merged

kellyguo11 merged 6 commits into
isaac-sim:dev/newtonfrom
ooctipus:newton/fix_xyzw

Conversation

@ooctipus

@ooctipus ooctipus commented Jan 19, 2026 •

Copy link
Copy Markdown
Collaborator

Description

This PR fixes more wxyz -> xyzw found in dev/newton.

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

@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Jan 19, 2026
@ooctipus ooctipus changed the title fixes more xyzw issues [NEWTON]Fixes more xyzw issues in core Jan 19, 2026
@greptile-apps

greptile-apps Bot commented Jan 19, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

  • Standardizes quaternion convention from wxyz (USD/OpenGL) to xyzw (industry standard) across multiple core components in IsaacLab
  • Removes quaternion format conversion code in asset spawning and scene management by updating spawners to natively accept xyzw format
  • Introduces device-aware XFormPrim class with tensor operations while maintaining compatibility during migration to new XformPrimView system

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/sim/prims/xform_prim.py Complete overhaul of XFormPrim class to support xyzw quaternions and device-aware tensor operations
source/isaaclab/isaaclab/assets/asset_base.py Removes quaternion conversion logic in asset spawning, now passes xyzw format directly
source/isaaclab/isaaclab/scene/interactive_scene.py Eliminates quaternion format conversion when spawning assets in interactive scenes
source/isaaclab/isaaclab/sensors/camera/camera.py Updates Camera class for xyzw quaternions and new XFormPrim API with tensor-based operations

Confidence score: 4/5

  • This PR is generally safe to merge but requires careful attention due to fundamental quaternion convention changes across the codebase
  • Score reflects the systematic nature of changes and good code organization, but deducted one point due to complex quaternion reordering logic and the incomplete migration state
  • Pay close attention to xform_prim.py which contains critical quaternion conversion logic that could impact coordinate transformations throughout the system

Sequence Diagram

sequenceDiagram
    participant User
    participant InteractiveScene
    participant Cloner
    participant AssetBase
    participant XFormPrim
    participant SimulationContext

    User->>InteractiveScene: "__init__(cfg)"
    InteractiveScene->>InteractiveScene: "_is_scene_setup_from_cfg()"
    InteractiveScene->>InteractiveScene: "_add_entities_from_cfg()"
    
    loop For each asset in config
        InteractiveScene->>AssetBase: "spawn asset (if spawn config provided)"
        AssetBase->>XFormPrim: "create prim at path"
        XFormPrim-->>AssetBase: "prim created"
        AssetBase-->>InteractiveScene: "asset spawned"
    end
    
    InteractiveScene->>InteractiveScene: "clone_environments()"
    InteractiveScene->>Cloner: "clone_from_template()"
    Cloner-->>InteractiveScene: "environments cloned"
    
    InteractiveScene->>InteractiveScene: "filter_collisions()"
    InteractiveScene->>Cloner: "filter_collisions()"
    Cloner-->>InteractiveScene: "collisions filtered"
    
    User->>InteractiveScene: "reset(env_ids)"
    loop For each entity type
        InteractiveScene->>AssetBase: "reset(env_ids)"
        AssetBase-->>InteractiveScene: "reset complete"
    end
    
    User->>InteractiveScene: "update(dt)"
    loop For each entity type
        InteractiveScene->>AssetBase: "update(dt)"
        AssetBase-->>InteractiveScene: "update complete"
    end
    
    User->>InteractiveScene: "write_data_to_sim()"
    loop For each entity type
        InteractiveScene->>AssetBase: "write_data_to_sim()"
        AssetBase->>SimulationContext: "write data to simulation"
        SimulationContext-->>AssetBase: "data written"
        AssetBase-->>InteractiveScene: "write complete"
    end
Loading

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

8 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@@ -610,14 +610,11 @@ def _add_entities_from_cfg(self):
elif isinstance(asset_cfg, AssetBaseCfg):
# manually spawn asset
if asset_cfg.spawn is not None:
# convert quaternion from xyzw (config) to wxyz (spawner expects)
rot = asset_cfg.init_state.rot
orientation_wxyz = (rot[3], rot[0], rot[1], rot[2])
asset_cfg.spawn.func(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

style: Comment is now outdated - spawner no longer expects wxyz format

Suggested change
asset_cfg.spawn.func(
# spawn asset at specified pose

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

fixed

@ooctipus

Copy link
Copy Markdown
Collaborator Author

@greptile review again

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

6 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

@AntoineRichard AntoineRichard left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@AntoineRichard AntoineRichard changed the title [NEWTON]Fixes more xyzw issues in core [NEWTON] Fixes more xyzw issues in core Jan 20, 2026
@kellyguo11
kellyguo11 merged commit fb2d90a into isaac-sim:dev/newton Jan 20, 2026
@ooctipus
ooctipus deleted the newton/fix_xyzw branch February 5, 2026 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants