[Tasks] Fix surface gripper observation shapes - #7583
Conversation
There was a problem hiding this comment.
Isaac Lab Review Bot
The patch corrects unintended cross-environment broadcasting in the surface-gripper branches of object_grasped and object_stacked by flattening gripper state to one value per environment. The focused regression test covers both predicates across three distinct environment states, and the user-visible fix has an appropriate changelog fragment.
- Design and architecture: The change preserves the existing observation and scene-access structure while aligning surface-gripper predicates with the flat per-environment tensors already produced by the geometry and joint-gripper paths. No new abstraction or dependency is introduced.
- API: Function signatures, configuration inputs, and boolean result dtype remain unchanged. The corrected return shape is
(num_envs,)rather than the accidentally broadcast(num_envs, num_envs), restoring the intended per-environment observation behavior. - Implementation: The changed reshape directly prevents PyTorch from broadcasting
(num_envs, 1)against(num_envs,). The test independently distinguishes gripper states and object geometry, validating expected values as well as shape for both predicates. Its mocked Warp conversion is appropriately focused on tensor-combination semantics, though integration with the real Warp state layout remains outside this test's scope.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
Automated review; human maintainers own approval decisions.
Greptile SummaryThis PR fixes unintended cross-environment broadcasting in two surface-gripper stack observations.
Confidence Score: 5/5The PR appears safe to merge with no actionable correctness, security, or repository-rule issues identified. The new one-dimensional reshape matches the surface-gripper state contract and prevents the documented quadratic broadcast, while the regression test covers both affected predicates. Important Files Changed
Reviews (1): Last reviewed commit: "Fix surface gripper observation shapes" | Re-trigger Greptile |
|
run-ci |
Description
Fix surface-gripper stack observations so
object_graspedandobject_stackedreturn one boolean per environment. The surface-gripper state was reshaped to(num_envs, 1)before being combined with an(num_envs,)predicate, which caused PyTorch to broadcast the result to(num_envs, num_envs)while stepping the environment.No new dependencies are required.
Reported in TC_146506 for
IsaacContrib-Stack-Cube-UR10-Long-Suction-IK-Relwith the Newton Kamino backend.Type of change
Release backport
developScreenshots
Not applicable; this corrects an observation tensor shape.
Validation
uv run python tools/changelog/cli.py check --include-worktree developuv run isaaclab -fChecklist
uv run isaaclab -fsource/isaaclab_tasks/changelog.d/CONTRIBUTORS.md