Skip to content

fix(terminations): index before reduce in joint_pos_out_of_limit #3153

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

moribots
Copy link

@moribots moribots commented Aug 12, 2025

Description

Root cause: reduced over joints to [N] then indexed with [:, joint_ids] → IndexError.
Change: compare to limits → [N,J], slice columns with joint_ids → [N,K], then .any(dim=1).
Result: returns [N] without error for both [1,J,2] and [N,J,2] limit tensors; joint_ids=None still uses all joints.

Fixes #3152

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Updated existing unit test to use joint_pos_out_of_limit()

Checklist

  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation (N/A)
  • 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 (N/A)
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@moribots moribots marked this pull request as ready for review August 12, 2025 05:18
@moribots

This comment was marked as outdated.

@kellyguo11
Copy link
Contributor

@moribots - could you please point this PR to main? the feature/isaacsim_5_0 branch is outdated now.

@moribots moribots changed the base branch from feature/isaacsim_5_0 to main August 19, 2025 05:46
@moribots moribots requested a review from ooctipus as a code owner August 19, 2025 05:46
@moribots moribots force-pushed the mrahme/isaacsim_5_0_joint_pos_out_of_limit_bug branch from 9d2a25a to 7e753ea Compare August 19, 2025 05:46
@moribots
Copy link
Author

@moribots - could you please point this PR to main? the feature/isaacsim_5_0 branch is outdated now.

Definitely! Sorry, I was not aware of this

Root cause: reduced over joints to [N] then indexed with [:, joint_ids] → IndexError.
Change: compare to limits → [N,J], slice columns with joint_ids → [N,K], then .any(dim=1).
Result: returns [N] without error for both [1,J,2] and [N,J,2] limit tensors; joint_ids=None still uses all joints.
@moribots moribots force-pushed the mrahme/isaacsim_5_0_joint_pos_out_of_limit_bug branch 2 times, most recently from dc86fcd to 2859ac3 Compare August 19, 2025 05:52
@moribots moribots force-pushed the mrahme/isaacsim_5_0_joint_pos_out_of_limit_bug branch from 2859ac3 to f5b9ff4 Compare August 19, 2025 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug Report] joint_pos_out_of_limit indexing error when asset_cfg.joint_ids is set
2 participants