Skip to content

[Backport] PR #7987 to release/3.0.0 - #8028

Closed
isaaclab-bot[bot] wants to merge 1 commit into
release/3.0.0from
backport/release/3.0.0/pr-7987
Closed

isaaclab-bot[bot] wants to merge 1 commit into
release/3.0.0from
backport/release/3.0.0/pr-7987

Conversation

@isaaclab-bot

@isaaclab-bot isaaclab-bot Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Backports #7987 to release/3.0.0.

The original cherry-pick conflicted. An NVIDIA inference model proposed this resolution, and deterministic validation confirmed that it changes no paths outside the original PR. Because conflict resolution cannot be certified as an exact patch replay, this PR is intentionally a draft and requires release-maintainer review.

Field Commit
Original merged change 417aafcba64292e7859f1cc1888f6462cd8e59a7
Release base used 44e290c2db0fc8aaf323e9759bafc6463496066e
Proposed backport 589477cb3fcf26251d4f31dfb3534b9c0d484ebc

…7987)

`quat_apply` and `quat_apply_inverse` flattened quaternion and vector
batches independently, losing broadcasting and causing
`body_projected_gravity_b` to fail for multiple bodies. Both helpers now
broadcast leading dimensions following NumPy rules and return the
broadcast result shape. They use tensor views for broadcasting, without
materializing repeated inputs.

The observation only preserves an explicit body dimension, including
integer body selection. The frame-transformer tutorial explicitly
selects its single quaternion so its configured offset remains a flat
3-vector. Incompatible batch shapes now raise an error even when their
element counts match; callers intentionally pairing flattened arrays
must reshape them explicitly. The changelog also documents retained
singleton batch dimensions and potentially noncontiguous outputs for
transposed inputs; use `reshape` when flattening those outputs.

Consolidated forward/inverse coverage in the existing math test and
moved the gravity regression into `test_gravity_randomization.py`, using
different gravity directions per environment. No new test file. Merged
current `develop` and retained its multidimensional rotation coverage.

- Existing math, gravity, and reorientation checks passed. The caller
audit additionally passed 66 tests: 36 CPU/CUDA quaternion cases, 21
operational-space controller cases, and 9 existing dexterous-task,
FORGE, visualization, and sampler cases.
- 42 CPU/CUDA comparisons of consumer tensor paths and gradients agreed
with the old helpers. The tutorial offset failed backend-style stacking
before its one-line correction and passed afterward with the analytic
-90-degree yaw result.
- Confirmed the broadcasting and gravity regressions fail with the old
helpers and pass with the fix, including rejection of incompatible
equal-element-count batches.
- All pre-commit checks passed.
- Single-thread CPU / RTX 5090 microbenchmarks: matching `(4096, 16)`
GPU batches improved from about 27 to 25 microseconds; the gravity
broadcast case improved from about 33 to 27 microseconds. Matching large
CPU batches were about 17% slower (1.03 to 1.20 ms); matching
4096-element CPU batches were about unchanged (73 to 71 microseconds).

- Bug fix, with an explicit compatibility change for callers relying on
implicit flattened pairing.

- [ ] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

- [x] I have read and understood the contribution guidelines
- [x] I have run the `pre-commit` checks with `./isaaclab.sh --format`
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added a changelog fragment under
`source/isaaclab/changelog.d/`
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------

Signed-off-by: Lynn <[email protected]>
Co-authored-by: Octi Zhang <[email protected]>

(cherry picked from commit 417aafc)
@github-actions github-actions Bot added the isaac-lab Related to Isaac Lab team label Sep 25, 2026
@ooctipus

Copy link
Copy Markdown
Collaborator

Thanks for preparing this backport. The #7987 fix is now included in #8026 alongside #7988, so I am closing this separate PR to keep both release backports together. The combined PR passed 615 local tests and all formatting checks.

@ooctipus ooctipus closed this Sep 25, 2026
ooctipus pushed a commit that referenced this pull request Sep 25, 2026
Backports #7987 and #7988 to `release/3.0.0`, consolidating the separate
#8028 backport here.

- #7987: Fix quaternion rotation broadcasting and gravity observations
for multiple bodies. Preserve an explicit body dimension for integer
selections and select the single quaternion in the frame-transformer
tutorial. Callers relying on implicit flattened pairing must reshape
explicitly, as documented in the changelog.
- #7988: Pass current joint velocity directly to DC-motor torque-speed
clipping, fixing LSTM actuator limits and removing the cached velocity
buffer.

The existing #7988 backport is unchanged. The #7987 backport retains the
original production changes and quaternion regression while preserving
unrelated release-branch math tests; it excludes the unrelated rewrites
in #8028's generated conflict resolution. No new test files were added.

Validation: 615 existing math, gravity, DC-motor, ideal-PD, and
implicit-actuator tests passed locally, including CPU/CUDA coverage; the
benchmark was excluded. The multi-body gravity regression fails with the
pre-backport quaternion helpers and passes with the fix. All
formatting/pre-commit checks passed. The combined branch merges cleanly
with the checked release head.

Original commits: `417aafcba64292e7859f1cc1888f6462cd8e59a7` (#7987) and
`9c7cfc64333b4962d6420da67f1d8bb3a2f55880` (#7988). Both initial bot
backports required conflict resolution, so release-maintainer review
remains necessary.

---------

Co-authored-by: Lynn <[email protected]>
@kellyguo11
kellyguo11 deleted the backport/release/3.0.0/pr-7987 branch October 7, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants