Skip to content

Conversation

@yijieg
Copy link
Collaborator

@yijieg yijieg commented Dec 5, 2025

Description

  1. Fix the problem of success criterion reported in this bug. 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, reported in this bug. 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
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
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

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.

1 participant