Skip to content

Fix Haply scene configuration lifecycle - #8647

Merged
kellyguo11 merged 1 commit into
isaac-sim:developfrom
kellyguo11:fix/haply-scene-config
Oct 16, 2026
Merged

kellyguo11 merged 1 commit into
isaac-sim:developfrom
kellyguo11:fix/haply-scene-config

Conversation

@kellyguo11

Copy link
Copy Markdown
Contributor

Description

Fixes NVBug 6939777.

FrankaHaplySceneCfg instantiated its Franka articulation while the module's class body was evaluated, before launch_simulation() created a USD stage. Importing the packaged Haply example therefore failed in find_matching_prims() with AttributeError: 'NoneType' object has no attribute 'GetPseudoRoot'.

Keep the scene's robot field as an ArticulationCfg so InteractiveScene instantiates it after simulation initialization. The existing initial pose, contact-sensor activation, and backend-specific USD physics variant remain unchanged.

Add a hardware-free regression test that imports the example and constructs its scene configuration without a simulation or Haply device. No new dependencies are required.

Type of change

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

Release backport

  • Backport this pull request to the active release branch after it merges into develop

Screenshots

Not applicable.

Validation

  • Reproduced the original no-stage import failure before the fix.
  • uv run --extra test --no-sync python -m pytest source/isaaclab/test/app/test_standalone_scripts.py -q: 30 passed, 379 skipped.
  • ISAACLAB_CHANGELOG_BASE_REF=upstream/develop uv run --extra test --no-sync isaaclab --format: passed all hooks.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with uv run isaaclab --format
  • I have made corresponding changes to the documentation (no documentation changes were required)
  • My changes generate no new warnings
  • I have validated the changed behavior with focused coverage and applied the test-audit criteria to the test change
  • I have added a changelog fragment under source/<pkg>/changelog.d/ for every touched package
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@kellyguo11
kellyguo11 requested a review from a team October 16, 2026 05:52
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels Oct 16, 2026
@kellyguo11

Copy link
Copy Markdown
Contributor Author

run-ci

@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 16, 2026

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Isaac Lab Review Bot

Needs attention: Test quality (1). Other reviewed categories look good.

  • PR description: The title and body match the three-file diff, explain the lifecycle failure and resulting behavior, and provide focused reproducible validation; no performance evidence is needed.
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: No over-engineering issues.
  • API: API changes look good.
  • Compatibility and deprecation: No breaking changes identified.
  • Implementation: Implementation looks good.
  • Style consistency: Style consistency looks good.
  • Test quality: The isinstance assertion covers the import-time lifecycle regression; the pose, sensor, and variant assertions merely copy unrelated example literals and should be removed.

Minor fixes needed. Posted 1 inline finding.

Automated review; human maintainers own approval decisions.

namespace = runpy.run_path(script)
scene_cfg = namespace['FrankaHaplySceneCfg'](num_envs=1, env_spacing=2.0)
assert isinstance(scene_cfg.robot, ArticulationCfg)
assert scene_cfg.robot.init_state.pos == (-0.02, 0.0, 1.05)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Warning · Test Quality — Assertions duplicate example config literals

Lines 102-104 copy the pose, contact-sensor, and physics-variant literals from the example's class body. The isinstance check already owns the regression, so these only force test edits whenever the example is retuned. Drop them.

@greptile-apps

greptile-apps Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Keeps FrankaHaplySceneCfg.robot as an ArticulationCfg so importing the example does not construct a robot before a simulation stage exists.

  • The Haply scene creates its Franka after simulation setup.

No actionable issues found. Tests were not run during this review.

Diagram

sequenceDiagram
    participant Import as Example import
    participant Config as FrankaHaplySceneCfg
    participant Main as main()
    participant Scene as InteractiveScene
    Import->>Config: Store robot as ArticulationCfg
    Main->>Main: launch_simulation()
    Main->>Main: Create SimulationContext
    Main->>Scene: instantiate(scene_cfg)
    Scene->>Scene: instantiate(robot config)
Loading

Reviews (1) · Last reviewed commit: "Fix Haply scene configuration lifecycle" · Reviewed by Greptile

@kellyguo11
kellyguo11 merged commit 9b6d2d8 into isaac-sim:develop Oct 16, 2026
61 of 63 checks passed
@isaaclab-bot

isaaclab-bot Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Backported to release/3.0.0 as b63cbde.

isaaclab-bot Bot pushed a commit that referenced this pull request Oct 16, 2026
# Description

Fixes NVBug 6939777.

`FrankaHaplySceneCfg` instantiated its Franka articulation while the
module's class body was evaluated, before `launch_simulation()` created
a USD stage. Importing the packaged Haply example therefore failed in
`find_matching_prims()` with `AttributeError: 'NoneType' object has no
attribute 'GetPseudoRoot'`.

Keep the scene's `robot` field as an `ArticulationCfg` so
`InteractiveScene` instantiates it after simulation initialization. The
existing initial pose, contact-sensor activation, and backend-specific
USD physics variant remain unchanged.

Add a hardware-free regression test that imports the example and
constructs its scene configuration without a simulation or Haply device.
No new dependencies are required.

## Type of change

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

## Release backport

- [x] <!-- backport-active-release --> Backport this pull request to the
active release branch after it merges into `develop`

## Screenshots

Not applicable.

## Validation

- Reproduced the original no-stage import failure before the fix.
- `uv run --extra test --no-sync python -m pytest
source/isaaclab/test/app/test_standalone_scripts.py -q`: 30 passed, 379
skipped.
- `ISAACLAB_CHANGELOG_BASE_REF=upstream/develop uv run --extra test
--no-sync isaaclab --format`: passed all hooks.

## 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
`uv run isaaclab --format`
- [x] I have made corresponding changes to the documentation (no
documentation changes were required)
- [x] My changes generate no new warnings
- [x] I have validated the changed behavior with focused coverage and
applied the [test-audit
criteria](https://github.com/isaac-sim/IsaacLab/blob/develop/skills/developer/test-audit/SKILL.md)
to the test change
- [x] I have added a changelog fragment under
`source/<pkg>/changelog.d/` for every touched package
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

(cherry picked from commit 9b6d2d8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working isaac-lab Related to Isaac Lab team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant