-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix suction cup status tensor shape in terminations.py #4507
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: main
Are you sure you want to change the base?
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]
|
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.
1 file reviewed, 1 comment
| if hasattr(env.scene, "surface_grippers") and len(env.scene.surface_grippers) > 0: | ||
| surface_gripper = env.scene.surface_grippers["surface_gripper"] | ||
| suction_cup_status = surface_gripper.state.view(-1, 1) # 1: closed, 0: closing, -1: open | ||
| suction_cup_status = surface_gripper.state.view(-1) # 1: closed, 0: closing, -1: open |
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.
Same shape issue exists in place/mdp/terminations.py lines 53 & 101 - check if those need the same fix
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]