Repository navigation
Fix Haply scene configuration lifecycle - #8647
Conversation
|
run-ci |
There was a problem hiding this comment.
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
isinstanceassertion 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) |
There was a problem hiding this comment.
🟡 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.
[Medium impact] The PR appears safe to merge. SummaryKeeps
No actionable issues found. Tests were not run during this review. DiagramsequenceDiagram
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)
Reviews (1) · Last reviewed commit: "Fix Haply scene configuration lifecycle" · Reviewed by Greptile |
|
Backported to |
# 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)
Description
Fixes NVBug 6939777.
FrankaHaplySceneCfginstantiated its Franka articulation while the module's class body was evaluated, beforelaunch_simulation()created a USD stage. Importing the packaged Haply example therefore failed infind_matching_prims()withAttributeError: 'NoneType' object has no attribute 'GetPseudoRoot'.Keep the scene's
robotfield as anArticulationCfgsoInteractiveSceneinstantiates 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
Release backport
developScreenshots
Not applicable.
Validation
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
pre-commitchecks withuv run isaaclab --formatsource/<pkg>/changelog.d/for every touched packageCONTRIBUTORS.mdor my name already exists there