Adds unit tests for Assets interface checks using mocks#4768
Open
AntoineRichard wants to merge 4 commits intoisaac-sim:developfrom
Open
Adds unit tests for Assets interface checks using mocks#4768AntoineRichard wants to merge 4 commits intoisaac-sim:developfrom
AntoineRichard wants to merge 4 commits intoisaac-sim:developfrom
Conversation
Contributor
Greptile SummaryThis PR adds comprehensive unit tests for articulation interface validation using mocks, enabling testing without Isaac Sim. The test infrastructure validates that Mock and PhysX backends comply with the same interface contract, checking data types, shapes, and writer methods across 1800+ test cases. Key Changes:
Critical Issue:
Confidence Score: 3/5
Important Files Changed
Last reviewed commit: 395d640 |
| if joint_mask is not None: | ||
| if isinstance(joint_mask, wp.array): | ||
| joint_mask = wp.to_torch(joint_mask) | ||
| joint_ids = torch.nonzero(joint_mask)[0].to(torch.int32) |
Contributor
There was a problem hiding this comment.
Indexing error: should use [:, 0] instead of [0]
torch.nonzero() returns a 2D tensor where each row contains indices. Using [0] only gets the first row (a single element), whereas [:, 0] correctly gets all elements from the first column. This is inconsistent with all other mask resolver methods in this file.
Suggested change
| joint_ids = torch.nonzero(joint_mask)[0].to(torch.int32) | |
| joint_ids = torch.nonzero(joint_mask)[:, 0].to(torch.int32) |
Contributor
|
looks like needs to run the formatter :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds unit tests for assets interface checks using mocks.
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there