Skip to content

Updates Mocks#4720

Merged
AntoineRichard merged 8 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/assets_uts
Feb 27, 2026
Merged

Updates Mocks#4720
AntoineRichard merged 8 commits into
isaac-sim:developfrom
AntoineRichard:antoiner/assets_uts

Conversation

@AntoineRichard

@AntoineRichard AntoineRichard commented Feb 25, 2026

Copy link
Copy Markdown
Collaborator

Description

Updates the mocks to match the API signature after the latest changes. Builds on top of #4719

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

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

@greptile-apps

greptile-apps Bot commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Updates mock interfaces to match the latest API signatures after recent changes to shape handling and type annotations.

Key changes:

  • Shape corrections: Fixed body_mass from (N, 1, 1) to (N, 1), and body_inertia to consistent (N, num_bodies, 9) format across all mock implementations
  • Type signature updates: Added wp.array and torch.Tensor type hints to all write methods in mocks, matching the real implementations
  • Validation infrastructure: Added assert_shape_and_dtype methods to AssetBase for debug-mode validation of inputs (zero overhead in optimized builds)
  • API consistency: Updated find_joints, find_fixed_tendons, and find_spatial_tendons to accept list[str] instead of list[int] for subset parameters
  • Float support: Updated tendon setter signatures to accept float values in addition to tensors
  • Removed duplicates: Removed duplicate com_pos_b and com_quat_b properties from mocks (now inherited from base classes)
  • Tests updated: All test assertions updated to match the corrected shapes

All changes are consistent and maintain backward compatibility while improving type safety and validation.

Confidence Score: 5/5

  • Safe to merge - well-structured mock updates with comprehensive test coverage
  • All mock interfaces correctly updated to match API signatures, shape fixes are consistent across codebase, tests updated and passing, changelog properly documented, and validation added with zero runtime overhead in production
  • No files require special attention

Important Files Changed

Filename Overview
source/isaaclab/isaaclab/assets/asset_base.py Added shape and dtype validation methods for debug-mode checking
source/isaaclab/isaaclab/test/mock_interfaces/assets/mock_articulation.py Updated mock to match API: body_inertia shape, find methods, type hints, removed duplicate properties
source/isaaclab/isaaclab/test/mock_interfaces/assets/mock_rigid_object.py Updated mock to match API: body_mass shape, type hints, removed duplicate properties, added keyword-only args
source/isaaclab_physx/isaaclab_physx/assets/articulation/articulation.py Added shape/dtype assertions to all write methods for validation
source/isaaclab_physx/isaaclab_physx/assets/rigid_object/rigid_object_data.py Fixed body_mass shape documentation and added reshape for body_inertia to (N, 1, 9)
source/isaaclab_physx/isaaclab_physx/assets/rigid_object_collection/rigid_object_collection_data.py Fixed body_mass reshape to (N, num_bodies) instead of (N, num_bodies, 1)

Last reviewed commit: 314dc3b

@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.

38 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@kellyguo11

Copy link
Copy Markdown
Contributor

can you help rebase this one?

@AntoineRichard AntoineRichard merged commit 3b9fcd2 into isaac-sim:develop Feb 27, 2026
5 of 9 checks passed
AntoineRichard added a commit that referenced this pull request Feb 27, 2026
# Description

Adds mock interfaces selection API. Getting the code ready to write UTs
across backends. Built ontop of
#4720

## Type of change

- New feature (non-breaking change which adds functionality)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
daniela-hase pushed a commit to daniela-hase/IsaacLab that referenced this pull request Mar 30, 2026
# Description

Updates the mocks to match the API signature after the latest changes.
Builds on top of isaac-sim#4719

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
daniela-hase pushed a commit to daniela-hase/IsaacLab that referenced this pull request Mar 30, 2026
# Description

Adds mock interfaces selection API. Getting the code ready to write UTs
across backends. Built ontop of
isaac-sim#4720

## Type of change

- New feature (non-breaking change which adds functionality)

## Checklist

- [x] I have read and understood the [contribution
guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html)
- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
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.

3 participants