Skip to content

[Bug Report] joint‑limit termination helpers raise *IndexError: too many indices* when joint_ids is set #2441

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
2 of 4 tasks
GiulioRomualdi opened this issue May 7, 2025 · 2 comments · May be fixed by #2442
Open
2 of 4 tasks
Labels
bug Something isn't working

Comments

@GiulioRomualdi
Copy link
Contributor

Describe the bug

Calling joint_pos_out_of_limit or joint_pos_out_of_manual_limit with asset_cfg.joint_ids set to anything other than None raises

IndexError: too many indices for tensor of dimension 1

because the helpers reduce across joints (torch.any(dim=1)) before they slice with asset_cfg.joint_ids, leaving a 1‑D tensor that cannot be indexed with [:, ids].

Steps to reproduce

System Info

  • Commit: 82cb320 (current main)
  • Isaac Sim Version: 4.5.0
  • OS: 22.04
  • GPU: NVIDIA L40S
  • CUDA: 12.4
  • GPU Driver: 550.107.02

Additional context

The bug breaks any workflow that relies on per‑joint termination masks
(e.g. training tasks that deactivate specific joints).

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have confirmed the error is in Isaac Lab helpers, not in Isaac Sim

Acceptance Criteria

  • joint_pos_out_of_limit works for None, slice, list and tensor joint selections.
  • joint_pos_out_of_manual_limit shows the same correct behaviour.
@GiulioRomualdi GiulioRomualdi linked a pull request May 7, 2025 that will close this issue
10 tasks
@GiulioRomualdi
Copy link
Contributor Author

Fixed by #2442

@RandomOakForest
Copy link
Collaborator

Thanks for posting this and adding the PR. The team will review it. Thanks!

@RandomOakForest RandomOakForest added the bug Something isn't working label May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants