Skip to content

Fixes grasp for Automate environments#4157

Merged
kellyguo11 merged 7 commits intoisaac-sim:developfrom
yijieg:fix_grasp
Feb 25, 2026
Merged

Fixes grasp for Automate environments#4157
kellyguo11 merged 7 commits intoisaac-sim:developfrom
yijieg:fix_grasp

Conversation

@yijieg
Copy link
Copy Markdown
Collaborator

@yijieg yijieg commented Dec 5, 2025

Description

  1. Fix the problem of success criterion. The root cause is not the reward design. The weird behavior is because the finger does not fully grasp the plug, i.e., the white part, before moving to the target end-effector pose. Therefore, I increase the grasp time at the reset of each episode to ensure that the finger fully grasp the plug.
  2. Fix the problem that dtw reward computation does not work with CUDA 13. To run AutoMate with CUDA 13, it requires updated packages of numba-cuda[cu13], coverage, and pytorch. I update the documentation to explain this requirement.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

Screenshots

Please attach before and after screenshots of the change if applicable.
Before:
Screenshot from 2025-12-05 10-08-36

After:
Screenshot from 2025-12-05 10-04-47

Checklist

  • [ x ] I have read and understood the contribution guidelines
  • [ x ] I have run the pre-commit checks with ./isaaclab.sh --format
  • [ x ] I have made corresponding changes to the documentation
  • [ x ] 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
  • [ x ] I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Dec 5, 2025
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Dec 5, 2025

Greptile Overview

Greptile Summary

This PR addresses two bugs in the AutoMate assembly environments:

  • Grasp timing fix: Increased grasp time from 0.25s to 1.0s during episode reset to ensure the gripper fully grasps the plug before moving to target end-effector pose. This resolves incorrect success criterion behavior where the plug was not fully grasped.

  • CUDA 13 compatibility: Removed runtime CUDA version detection and enabled CUDA by default for DTW reward computation. Updated numba import pattern (import numba.cuda as cuda instead of from numba import cuda) for CUDA 13 compatibility. Documentation updated with CUDA 13 installation instructions for 580 drivers.

The changes simplify the codebase by removing unnecessary CUDA version checking logic while enabling proper CUDA 13 support through updated dependencies (numba-cuda[cu13], coverage==7.6.1).

Confidence Score: 4/5

  • This PR is safe to merge with minor documentation formatting to address
  • The code changes are straightforward bug fixes - increased grasp timing and updated numba import for CUDA 13. The removed CUDA version detection simplifies the code. Only minor issue is RST documentation formatting.
  • Minor RST formatting issue in docs/source/overview/environments.rst (missing blank line before code block)

Important Files Changed

File Analysis

Filename Score Overview
docs/source/overview/environments.rst 3/5 Documentation update for CUDA 13 support. Adds installation instructions for 580 drivers and CUDA 13 with numba-cuda. Minor RST formatting issue - missing blank line before code block directive.
source/isaaclab_tasks/isaaclab_tasks/direct/automate/assembly_env.py 5/5 Removed CUDA version detection and conditional SoftDTW initialization. Now always uses CUDA. Increased grasp time from 0.25 to 1.0 seconds to ensure full grasp before moving to target pose.
source/isaaclab_tasks/isaaclab_tasks/direct/automate/automate_algo_utils.py 5/5 Removed get_cuda_version() and parse_cuda_version() helper functions along with unused imports (re, subprocess). Clean removal with no residual references.
source/isaaclab_tasks/isaaclab_tasks/direct/automate/soft_dtw_cuda.py 5/5 Changed numba.cuda import pattern from from numba import cuda to import numba.cuda as cuda for CUDA 13 compatibility. This is a known fix for numba-cuda compatibility.

Sequence Diagram

sequenceDiagram
    participant User
    participant AssemblyEnv
    participant SoftDTW
    participant CUDA

    User->>AssemblyEnv: Reset Episode
    AssemblyEnv->>AssemblyEnv: _reset_idx()
    AssemblyEnv->>AssemblyEnv: randomize_initial_state()
    AssemblyEnv->>AssemblyEnv: Close gripper (1.0s grasp time)
    Note over AssemblyEnv: Previously 0.25s, now 1.0s<br/>ensures full grasp

    User->>AssemblyEnv: Step (action)
    AssemblyEnv->>AssemblyEnv: _get_rewards()
    AssemblyEnv->>SoftDTW: Compute DTW reward
    SoftDTW->>CUDA: GPU computation (always enabled)
    Note over SoftDTW,CUDA: CUDA version check removed<br/>Now uses numba.cuda import
    CUDA-->>SoftDTW: DTW result
    SoftDTW-->>AssemblyEnv: Imitation reward
    AssemblyEnv-->>User: reward, done
Loading

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Comments (1)

  1. docs/source/overview/environments.rst, line 276-277 (link)

    style: Missing blank line before .. code-block:: directive. In RST, directives should have a blank line before them for proper rendering.

4 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

@Mayankm96 Mayankm96 force-pushed the main branch 2 times, most recently from 2ef7fc8 to f3061a4 Compare January 28, 2026 16:16
@kellyguo11 kellyguo11 changed the base branch from main to develop February 25, 2026 00:12
Signed-off-by: Kelly Guo <kellyg@nvidia.com>
@kellyguo11 kellyguo11 changed the title Fix grasp Fixes grasp for Automate environments Feb 25, 2026
Signed-off-by: Kelly Guo <kellyg@nvidia.com>
@kellyguo11 kellyguo11 merged commit 794fabf into isaac-sim:develop Feb 25, 2026
5 of 9 checks passed
daniela-hase pushed a commit to daniela-hase/IsaacLab that referenced this pull request Mar 30, 2026
# Description

1. Fix the problem of success criterion. The root cause is not the
reward design. The weird behavior is because the finger does not fully
grasp the plug, i.e., the white part, before moving to the target
end-effector pose. Therefore, I increase the grasp time at the reset of
each episode to ensure that the finger fully grasp the plug.
2. Fix the problem that dtw reward computation does not work with CUDA
13. To run AutoMate with CUDA 13, it requires updated packages of
numba-cuda[cu13], coverage, and pytorch. I update the documentation to
explain this requirement.

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- Documentation update

## Screenshots

Please attach before and after screenshots of the change if applicable.
Before:
<img width="486" height="348" alt="Screenshot from 2025-12-05 10-08-36"
src="https://github.com/user-attachments/assets/b6800456-9ff9-4feb-9249-1aa02fe6ec4c"
/>

After:
<img width="500" height="363" alt="Screenshot from 2025-12-05 10-04-47"
src="https://github.com/user-attachments/assets/f2e41859-7ea2-466c-bb49-4d6e1ca545aa"
/>


## 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`
- [ x ] I have made corresponding changes to the documentation
- [ x ] 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
- [ x ] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------

Signed-off-by: Kelly Guo <kellyg@nvidia.com>
Co-authored-by: Kelly Guo <kellyg@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants