Skip to content

Fix AutoMate PhysX sizing and assembly ID validation#6038

Merged
ooctipus merged 1 commit into
isaac-sim:developfrom
ooctipus:fix/automate-collision-stack
Jun 9, 2026
Merged

Fix AutoMate PhysX sizing and assembly ID validation#6038
ooctipus merged 1 commit into
isaac-sim:developfrom
ooctipus:fix/automate-collision-stack

Conversation

@ooctipus

@ooctipus ooctipus commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • increase AutoMate assembly/disassembly PhysX GPU collision stack size from the default 226 to 227
  • reject placeholder/non-5-digit AutoMate assembly IDs in the run helpers before they mutate config or launch simulation
  • update AutoMate docs to use a concrete runnable assembly ID example
  • add a lightweight config/helper regression test and an isaaclab_tasks changelog fragment

Rationale

The reported Windows beta2 disassembly run for assembly_id 00032 asks PhysX for a collision stack of roughly 75-86 MB, above the default 2**26 bytes. This keeps the memory change scoped to AutoMate's high-contact 128-env tasks instead of raising the global PhysX default for unrelated environments.

A second reported DGX Spark command passed the literal docs placeholder ASSEMBLY_ID, which was written into the task config and only failed later as a missing remote USD path. The helpers now fail fast with an argparse message before launching Kit.

Validation

  • python3 tools/changelog/cli.py check develop
  • python3 -m py_compile source/isaaclab_tasks/isaaclab_tasks/contrib/automate/run_w_id.py source/isaaclab_tasks/isaaclab_tasks/contrib/automate/run_disassembly_w_id.py source/isaaclab_tasks/test/contrib/test_automate_cfg.py source/isaaclab_tasks/isaaclab_tasks/contrib/automate/disassembly_env_cfg.py source/isaaclab_tasks/isaaclab_tasks/contrib/automate/assembly_env_cfg.py
  • .venv/bin/python -m pytest source/isaaclab_tasks/test/contrib/test_automate_cfg.py
  • uvx ruff==0.14.10 check --fix source/isaaclab_tasks/test/contrib/test_automate_cfg.py source/isaaclab_tasks/isaaclab_tasks/contrib/automate/run_w_id.py source/isaaclab_tasks/isaaclab_tasks/contrib/automate/run_disassembly_w_id.py source/isaaclab_tasks/isaaclab_tasks/contrib/automate/disassembly_env_cfg.py source/isaaclab_tasks/isaaclab_tasks/contrib/automate/assembly_env_cfg.py
  • uvx ruff==0.14.10 format source/isaaclab_tasks/test/contrib/test_automate_cfg.py source/isaaclab_tasks/isaaclab_tasks/contrib/automate/run_w_id.py source/isaaclab_tasks/isaaclab_tasks/contrib/automate/run_disassembly_w_id.py source/isaaclab_tasks/isaaclab_tasks/contrib/automate/disassembly_env_cfg.py source/isaaclab_tasks/isaaclab_tasks/contrib/automate/assembly_env_cfg.py
  • git diff --check
  • .venv/bin/python source/isaaclab_tasks/isaaclab_tasks/contrib/automate/run_w_id.py --assembly_id=ASSEMBLY_ID --train --max_iterations 10 exits at argparse with the placeholder-specific message and does not mutate the task config

Could not run the full PhysX/Kit repro locally because this machine's uv environment does not have Isaac Sim/Kit on PYTHONPATH; the command fails before simulation with Isaac Sim not installed.

@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Jun 8, 2026

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 Isaac Lab Review Bot

Summary

Clean, well-scoped bugfix that increases the PhysX GPU collision stack size from 2²⁶ (64 MB) to 2²⁷ (128 MB) for AutoMate assembly/disassembly environments only.

✅ Strengths

  • Minimal and targeted — only affects AutoMate high-contact 128-env tasks, not global PhysX defaults
  • Consistent — same change applied symmetrically to both assembly_env_cfg.py and disassembly_env_cfg.py
  • Regression test includedtest_automate_cfg.py is a lightweight config assertion that does not require Isaac Sim runtime
  • Changelog fragment — properly added under changelog.d/
  • Placementgpu_collision_stack_size is grouped with other gpu_max_* settings, maintaining readability

🔍 Observations

  1. The 2²⁷ value (128 MB) gives ~50-70% headroom above the reported 75-86 MB requirement — reasonable margin without being excessive.
  2. The test instantiates the full *EnvCfg dataclass and checks .sim.physics.gpu_collision_stack_size — will catch accidental regressions or config refactors that drop this setting.

💡 Minor Suggestions (non-blocking)

  • Consider adding an inline comment (like the existing # Important for stable simulation. on gpu_max_num_partitions) explaining why 2²⁷ was chosen, e.g. # 128 MB; default 64 MB insufficient for 128-env high-contact scenes.
  • The test file could optionally use @pytest.mark.parametrize if more config assertions are added later, but for two assertions this is fine as-is.

Verdict

LGTM ✅ — No correctness or architectural concerns. CI passing where applicable (pre-commit ✓, build ✓). Ready to merge once remaining CI checks complete.


Reviewed at commit: fd307ba

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review Summary

Overall Assessment: This is a clean, minimal fix for the PhysX GPU collision stack sizing issue in AutoMate environments, with a simple guard against running with placeholder assembly IDs.

Changes Since Last Review (33122098feda53)

The PR has been significantly simplified — the parse_assembly_id() helper, unit tests, documentation changes, and argparse type= integration have been removed in favor of a minimal inline check. This is now a much smaller, more focused PR.

Strengths

  1. Properly scoped PhysX fix: The gpu_collision_stack_size=2**27 increase is applied only to AutoMate assembly and disassembly environments, avoiding side effects on other environments. The 2^27 value (~134 MB) provides good headroom over the reported 75-86 MB requirement.

  2. Minimal validation: Both run_w_id.py and run_disassembly_w_id.py now catch the common mistake of running with the documentation placeholder ASSEMBLY_ID before simulation starts. The error message is clear and actionable.

  3. Changelog entry: Properly formatted changelog fragment covering both changes.

Minor Observations

  • The validation only catches the exact string "ASSEMBLY_ID". This is intentional simplicity — it catches the most common user mistake (copy-pasting from docs without replacing the placeholder) without over-engineering.

  • The changelog still mentions "docs to reject placeholder assembly IDs" but the actual docs changes from the previous revision have been removed. The changelog entry is slightly broader than what the code does now — may want to adjust "and docs" to just "run helpers". (Very minor, not blocking.)

Verification

The changes look correct:

  • Both assembly_env_cfg.py and disassembly_env_cfg.py consistently set gpu_collision_stack_size=2**27
  • Both run helpers validate the placeholder identically
  • No syntax or formatting issues
  • PR is now 5 files with minimal, easy-to-review changes

Reviewed at 8feda53 (incremental update from 3312209) 🤖

@greptile-apps

greptile-apps Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR increases the PhysX GPU collision stack size from the default 2**26 bytes to 2**27 bytes for both AutoMate assembly and disassembly environments to avoid dropped contacts at 128 parallel environments, and adds a lightweight config regression test to prevent the value from regressing.

  • assembly_env_cfg.py and disassembly_env_cfg.py each receive a single gpu_collision_stack_size=2**27 line in their PhysxCfg block, keeping the change scoped to the high-contact AutoMate tasks.
  • test_automate_cfg.py adds two assertions that verify both config classes expose the expected stack-size value, guarding against future inadvertent resets.
  • A changelog fragment is included for the isaaclab_tasks package.

Confidence Score: 5/5

Safe to merge; the change is a single-line additive config tweak in two closely mirrored files, matched by a regression test.

Both env configs receive identical, well-motivated increases to the PhysX collision stack. The new test correctly walks the sim.physics.gpu_collision_stack_size attribute chain. The changelog fragment is in the right place. No logic is altered outside of memory sizing, and the test guards against future regression.

No files require special attention. The test will simply fail to import in CI environments without Isaac Sim, which is consistent with existing project constraints rather than a new problem introduced here.

Important Files Changed

Filename Overview
source/isaaclab_tasks/isaaclab_tasks/contrib/automate/assembly_env_cfg.py Added gpu_collision_stack_size=2**27 to PhysxCfg to prevent collision-stack overflow at the default 128 environments.
source/isaaclab_tasks/isaaclab_tasks/contrib/automate/disassembly_env_cfg.py Added gpu_collision_stack_size=2**27 to PhysxCfg, mirroring the fix in the assembly config.
source/isaaclab_tasks/test/contrib/test_automate_cfg.py New test file asserting the gpu_collision_stack_size config value for both env classes; will error in environments without Isaac Sim on PYTHONPATH, which is expected for this project.
source/isaaclab_tasks/changelog.d/fix-automate-collision-stack.rst Changelog fragment correctly placed under the Fixed section describing the collision-stack increase.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[AssemblyEnvCfg / DisassemblyEnvCfg] --> B[SimulationCfg]
    B --> C[PhysxCfg]
    C --> D["gpu_collision_stack_size = 2**27 (128 MiB)"]
    C --> E["gpu_max_rigid_contact_count = 2**23"]
    C --> F["gpu_max_rigid_patch_count = 2**23"]
    C --> G["gpu_max_num_partitions = 1"]
    D --> H["Prevents collision-stack overflow at 128 parallel environments"]
    H --> I["test_automate_cfg.py asserts value stays at 2**27"]
Loading

Reviews (1): Last reviewed commit: "Fix AutoMate PhysX collision stack sizin..." | Re-trigger Greptile

@ooctipus ooctipus force-pushed the fix/automate-collision-stack branch from fd307ba to 3312209 Compare June 8, 2026 21:49
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 8, 2026
@ooctipus ooctipus changed the title Fix AutoMate PhysX collision stack sizing Fix AutoMate PhysX sizing and assembly ID validation Jun 8, 2026
@ooctipus ooctipus force-pushed the fix/automate-collision-stack branch from 3312209 to 8feda53 Compare June 8, 2026 22:07
@ooctipus ooctipus merged commit d39c8bd into isaac-sim:develop Jun 9, 2026
39 of 40 checks passed
ooctipus added a commit that referenced this pull request Jun 9, 2026
…ation (#6048)

## Summary
- Cherry-pick #6038 from develop into release/3.0.0-beta2
- Increase AutoMate PhysX GPU collision stack sizing for
assembly/disassembly tasks
- Reject the literal ASSEMBLY_ID placeholder before resolving AutoMate
asset paths

## Validation
- git diff --check refs/remotes/upstream/release/3.0.0-beta2...HEAD
- python3 -m py_compile
source/isaaclab_tasks/isaaclab_tasks/direct/automate/run_w_id.py
source/isaaclab_tasks/isaaclab_tasks/direct/automate/run_disassembly_w_id.py
source/isaaclab_tasks/isaaclab_tasks/direct/automate/assembly_env_cfg.py
source/isaaclab_tasks/isaaclab_tasks/direct/automate/disassembly_env_cfg.py
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