Fixes suction cup status tensor shape in terminations.py#4507
Fixes suction cup status tensor shape in terminations.py#4507kellyguo11 merged 4 commits intoisaac-sim:mainfrom
Conversation
The termination_manager expects a tensor of [1] but the previous view setup was creating a tensor of [1,1] causing the IsaacLab sim/task to crash Signed-off-by: Raymond Andrade <raymond808state1@gmail.com>
Fix suction cup status tensor shape in terminations.py
Greptile OverviewGreptile SummaryChanged Key Changes:
Additional Notes:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Env as ManagerBasedRLEnv
participant TM as TerminationManager
participant CT as cubes_stacked()
participant SG as SurfaceGripper
Env->>TM: compute()
TM->>CT: call termination function
CT->>SG: surface_gripper.state
SG-->>CT: raw state tensor
CT->>CT: view(-1) reshape to [num_envs]
CT->>CT: compare with -1 (open state)
CT->>CT: logical_and with stacked condition
CT-->>TM: boolean tensor [num_envs]
TM->>TM: store in _term_dones[:, i]
TM-->>Env: combined termination signal [num_envs]
|
|
Hi @808brick. Thanks for reporting this! That looks like a bug indeed! Could you follow Greptiles suggestion and update |
|
Okay. Will have time to work on this on Sunday.
…On Wed, Feb 4, 2026 at 9:47 AM Antoine RICHARD ***@***.***> wrote:
*AntoineRichard* left a comment (isaac-sim/IsaacLab#4507)
<#4507 (comment)>
Hi @808brick <https://github.com/808brick>. Thanks for reporting this!
That looks like a bug indeed! Could you follow Greptiles suggestion and
update place/mdp/terminations.py ? Thanks! @kellyguo11
<https://github.com/kellyguo11> for viz. We may want to get that in both
main and develop.
—
Reply to this email directly, view it on GitHub
<#4507 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACSAP2BZEBNQITIQ2FGUDU34KIWBXAVCNFSM6AAAAACTSDGDTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTQNBYGI4DGNJUGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Signed-off-by: Raymond Andrade <raymond808state1@gmail.com>
|
Hey @AntoineRichard, apologies for the delay on this fix. I've gone ahead and made the change requested by greptile. It is worth noting that the average user would never run into the tensor shape mismatch error since the two tasks in the place env [ But I was able to reproduce the tensor shape mismatch error by importing a suction gripper into the environment/task: Which was remedied by changing the shape from So for the sake of modularity, I indeed agree with changes proposed by greptile and do not recommend removing these code blocks as it is still needed for users who may want to complete the place task with a custom suction based robot. Let me know if there are any other additional changes which should be made for this particular issue. |
|
No worries! Thanks for making the changes! @rebeccazhang0707 could you take a look? |
) The termination_manager expects a tensor of [1] but the previous view setup was creating a tensor of [1,1] causing the IsaacLab sim/task to crash # Description <!-- Thank you for your interest in sending a pull request. Please make sure to check the contribution guidelines. Link: https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html 💡 Please try to keep PRs small and focused. Large PRs are harder to review and merge. --> Changed the view shape in line 63 of `terminations.py` from ```python suction_cup_status = surface_gripper.state.view(-1, 1) ``` to ```python suction_cup_status = surface_gripper.state.view(-1) ``` Which provided the correct tensor shape expected by `termination_manager.py` Fixes # [4506](isaac-sim#4506) ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - Bug fix (non-breaking change which fixes an issue) ## Screenshots ### Before <img width="1029" height="441" alt="Screenshot from 2026-01-31 19-25-22" src="https://github.com/user-attachments/assets/8c8c20eb-6fa7-4d1f-bc98-b93c773dcc74" /> ### After <img width="1684" height="917" alt="Screenshot from 2026-01-31 19-22-44" src="https://github.com/user-attachments/assets/6e1bf676-37d6-4d8e-bc83-6b5e8464aa62" /> <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ |<img width="1684" height="917" alt="Screenshot from 2026-01-31 19-22-44" src="https://github.com/user-attachments/assets/6e1bf676-37d6-4d8e-bc83-6b5e8464aa62" />| To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## 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` - [ ] I have made corresponding changes to the documentation _[Not Needed, should return normal functionality]_ - [X] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works _[Open To Feedback Here]_ - [ ] 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 _[Not Needed]_ --------- Signed-off-by: Raymond Andrade <raymond808state1@gmail.com>
The termination_manager expects a tensor of [1] but the previous view setup was creating a tensor of [1,1] causing the IsaacLab sim/task to crash
Description
Changed the view shape in line 63 of
terminations.pyfromto
Which provided the correct tensor shape expected by
termination_manager.pyFixes # 4506
Type of change
Screenshots
Before
After
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there [Not Needed]