-
Notifications
You must be signed in to change notification settings - Fork 3k
[Newton] Fix find joints / body masks #4456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev/newton
Are you sure you want to change the base?
[Newton] Fix find joints / body masks #4456
Conversation
… at least). There are still some errors some will be patched by latest newton.
…h more or less success.
…lean-up session with a Newton Eng to sanity check this.
…position as this is now handled properly by newton. Still a couple of weird cases left.
…rovided Fixes GitHub issue isaac-sim#4439. When joint_subset or body_subset is provided, the returned indices were relative to the subset (local indices) instead of the full joint_names or body_names list (global indices). This caused incorrect mask values. The fix maps matched names back to their global indices when a subset is explicitly provided, with zero overhead for the default case. Also adds body_subset parameter to find_bodies for consistency.
Greptile OverviewGreptile SummaryFixed critical indexing bug in Core Fix:
Additional Changes:
Test Coverage:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Articulation
participant find_joints
participant resolve_matching_names
User->>Articulation: find_joints(".*", joint_subset=["front_left_leg", "front_left_foot", "left_back_leg", "left_back_foot"])
Articulation->>find_joints: Call with joint_names=[all 8 joints], subset=[4 joints]
Note over find_joints: search_target = joint_subset (4 joints)
find_joints->>resolve_matching_names: Match ".*" in subset
resolve_matching_names-->>find_joints: indices=[0,1,2,3] (local to subset), names=[4 matched joints]
Note over find_joints: Bug was here - returned local indices<br/>Fix: Map names back to global indices
find_joints->>find_joints: indices = [joint_names.index(n) for n in names]
Note over find_joints: New indices=[0,1,4,5] (global positions)
find_joints->>find_joints: Create mask with len(joint_names)<br/>Set mask[0,1,4,5] = True
find_joints-->>Articulation: Return (mask, names, [0,1,4,5])
Articulation-->>User: Global indices [0,1,4,5] ✓
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No files reviewed, no comments
|
Could we try to capture some of the other changes in the PR description as well? or maybe we can try splitting up the PR a bit. github seems to be refusing to show more than 1 file at a time because of the PR size. |
Description
Fixes a bug in the mask creation when only a partial list of joints / body were passed.
Fixes #4439
Type of change
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there