Skip to content

Conversation

@AntoineRichard
Copy link
Collaborator

@AntoineRichard AntoineRichard commented Jan 22, 2026

Description

Changes the quaternion convention in IsaacLab to match that of:

  • ROS
  • PhysX
  • Newton
  • Scipy
  • Low level USD

Fixes https://github.com/isaac-sim/IsaacLab-Internal/issues/744

This PR brings massive changes throughout the code base. Almost all users should expect their code to be impacted by these changes. We provide a tool that should help users navigate these changes.

./scripts/tools/find_quaternions.py provides users with an automated script to search throughout the code base some quaternions that do not differ between the current code and a given commit. This can be used to track if your code has changed the order of its hard-coded quaternions.

For instance running the following will show all the quaternions that might need to be updated inside your extension. The dry-run flag will make it so that the script does not attempt to modify the quaternions.

./scripts/tools/find_quaternions.py --path PATH_TO_YOUR_EXTENSION --all-quats --fix --context 4 --dry-run

If you want to modify the quaternions the script comes with an interactive mode where it prompts you with changes to be made, to do so remove the --dry-run flag:

./scripts/tools/find_quaternions.py --path PATH_TO_YOUR_EXTENSION --all-quats --fix --context 4

The --context flag provides more or less context before and after the line where a quaternion was found.

Here is a sample of the interactive mode:

Searching 968 Python, 11 JSON, and 6 RST files...
Comparing against: main
Found 178 files changed from main

Found 69 potential quaternions to review:

====================================================================================================

────────────────────────────────────────────────────────────────────────────────
📍 source/isaaclab_assets/isaaclab_assets/robots/anymal.py:173 [AMBIGUOUS]
────────────────────────────────────────────────────────────────────────────────
     169 | # Configuration - Sensors.
     170 | ##
     171 | 
     172 | ANYMAL_LIDAR_CFG = VELODYNE_VLP_16_RAYCASTER_CFG.replace(
>>>  173 |     offset=RayCasterCfg.OffsetCfg(pos=(-0.310, 0.000, 0.159), rot=(0.0, 0.0, 0.0, 1.0))
     174 | )
     175 | """Configuration for the Velodyne VLP-16 sensor mounted on the ANYmal robot's base."""
────────────────────────────────────────────────────────────────────────────────
  Change: [0.0, 0.0, 0.0, 1.0] → [0.0, 0.0, 1.0, 0.0]
  Result: offset=RayCasterCfg.OffsetCfg(pos=(-0.310, 0.000, 0.159), rot=(0.0, 0.0, 1.0, 0.0))
Apply this fix? [Y/n/a/q]: Y
  ✅ Fixed!

────────────────────────────────────────────────────────────────────────────────
📍 source/isaaclab_mimic/test/test_curobo_planner_franka.py:42 [AMBIGUOUS]
────────────────────────────────────────────────────────────────────────────────
      38 | 
      39 | # Predefined EE goals for the test
      40 | # Each entry is a tuple of: (goal specification, goal ID)
      41 | predefined_ee_goals_and_ids = [
>>>   42 |     ({"pos": [0.70, -0.25, 0.25], "quat": [0.0, 0.707, 0.0, 0.707]}, "Behind wall, left"),
      43 |     ({"pos": [0.70, 0.25, 0.25], "quat": [0.0, 0.707, 0.0, 0.707]}, "Behind wall, right"),
      44 |     ({"pos": [0.65, 0.0, 0.45], "quat": [1.0, 0.0, 0.0, 0.0]}, "Behind wall, center, high"),
      45 |     ({"pos": [0.80, -0.15, 0.35], "quat": [0.0, 0.5, 0.0, 0.866]}, "Behind wall, far left"),
      46 |     ({"pos": [0.80, 0.15, 0.35], "quat": [0.0, 0.5, 0.0, 0.866]}, "Behind wall, far right"),
────────────────────────────────────────────────────────────────────────────────
  Change: [0.0, 0.707, 0.0, 0.707] → [0.707, 0.0, 0.707, 0.0]
  Result: ({"pos": [0.70, -0.25, 0.25], "quat": [0.707, 0.0, 0.707, 0.0]}, "Behind wall, left"),
Apply this fix? [Y/n/a/q]: Y
  ✅ Fixed!

────────────────────────────────────────────────────────────────────────────────
📍 source/isaaclab_mimic/test/test_curobo_planner_franka.py:43 [AMBIGUOUS]
────────────────────────────────────────────────────────────────────────────────
      39 | # Predefined EE goals for the test
      40 | # Each entry is a tuple of: (goal specification, goal ID)
      41 | predefined_ee_goals_and_ids = [
      42 |     ({"pos": [0.70, -0.25, 0.25], "quat": [0.707, 0.0, 0.707, 0.0]}, "Behind wall, left"),
>>>   43 |     ({"pos": [0.70, 0.25, 0.25], "quat": [0.0, 0.707, 0.0, 0.707]}, "Behind wall, right"),
      44 |     ({"pos": [0.65, 0.0, 0.45], "quat": [1.0, 0.0, 0.0, 0.0]}, "Behind wall, center, high"),
      45 |     ({"pos": [0.80, -0.15, 0.35], "quat": [0.0, 0.5, 0.0, 0.866]}, "Behind wall, far left"),
      46 |     ({"pos": [0.80, 0.15, 0.35], "quat": [0.0, 0.5, 0.0, 0.866]}, "Behind wall, far right"),
      47 | ]
────────────────────────────────────────────────────────────────────────────────
  Change: [0.0, 0.707, 0.0, 0.707] → [0.707, 0.0, 0.707, 0.0]
  Result: ({"pos": [0.70, 0.25, 0.25], "quat": [0.707, 0.0, 0.707, 0.0]}, "Behind wall, right"),
Apply this fix? [Y/n/a/q]: Y
  ✅ Fixed!

Type of change

  • Breaking change (existing functionality will not work without user modification)
  • 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

@github-actions github-actions bot added documentation Improvements or additions to documentation asset New asset feature or request isaac-mimic Related to Isaac Mimic team labels Jan 22, 2026
@AntoineRichard AntoineRichard marked this pull request as ready for review January 23, 2026 13:49
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 23, 2026

Skipped: This PR changes more files than the configured file change limit: (142 files found, 100 file limit)

@kellyguo11
Copy link
Contributor

@njawale42 @peterd-NV @michaellin6 fyi - we'll likely need to update the curobo, mimic, and IK tests with these changes.

@AntoineRichard
Copy link
Collaborator Author

@ooctipus could you check the fabric stuff? I think I may have used the wrong ordering, but it still passes the tests somehow?

@AntoineRichard
Copy link
Collaborator Author

@kellyguo11 Looks like the regular test suites are passing. Do you know if we could run the whole set of tests on this PR?

@Mayankm96 Mayankm96 changed the title Quaternion convention change from WXYZ to XYZW Changes Quaternion convention from WXYZ to XYZW Jan 26, 2026
@ooctipus
Copy link
Collaborator

ooctipus commented Jan 26, 2026

I think fabric looks right!

@kellyguo11
Copy link
Contributor

latest CI run seems to have a lot more test failures in the camera classes and test_views_xform_prim and some other places. are these from recent updates to develop? also linter check is failing.

@AntoineRichard
Copy link
Collaborator Author

I just merged develop and fixed a couple things. It looks like almost everything is passing now?

@michaellin6
Copy link
Contributor

I took a quick look at the Pink IK related tests and env scripts, and the quat conventions have been updated correctly. If test_pink_ik.py is passing then it should be good on that side.

@kellyguo11
Copy link
Contributor

Thanks @michaellin6! looks like all the other failing ones are in the mimic extension now, we can probably disable those until mimic migrates to 3.0.

not sure why the factory environment test is timing out though. does that one run fine locally?

@kellyguo11
Copy link
Contributor

@AntoineRichard submitted a fix to your branch for the factory environments - AntoineRichard#6. let's merge this in once that's there

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

Labels

asset New asset feature or request documentation Improvements or additions to documentation infrastructure isaac-mimic Related to Isaac Mimic team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants