Repository navigation
[Backport release/3.0.0] Make stack teleop dependency optional - #8498
Conversation
|
run-ci |
|
| def block_teleop(name, *args, **kwargs): | ||
| if name == "isaaclab_teleop" or name.startswith("isaaclab_teleop."): | ||
| raise ModuleNotFoundError("No module named 'isaaclab_teleop'", name="isaaclab_teleop") |
There was a problem hiding this comment.
The new test covers only a missing isaaclab_teleop package. It would still pass if _make_default_xr_cfg swallowed every missing-dependency error or changed the XR defaults.
Add cases that check the existing anchor values when the package is available and that a ModuleNotFoundError naming another dependency escapes. These are explicit promises of this fix.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Style consistency (1). Other reviewed categories look good.
- PR description: Replace “defers creation of the default XR configuration” with “conditionally imports teleop,” because the default is still constructed during class definition.
- 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: The private helper precedes public functions and classes, violating required module ordering; replace it with a guarded
_DEFAULT_XR_CFGconstant in the constants section. - Test quality: Test quality looks good.
Minor fixes needed. Posted 1 inline finding.
Automated review; human maintainers own approval decisions.
| ] | ||
|
|
||
|
|
||
| def _make_default_xr_cfg() -> XrCfg | None: |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Private helper precedes public functions
Guide file order is constants, public functions, public classes, then private functions; this helper precedes both public functions. Replace it with a guarded _DEFAULT_XR_CFG constant in the constants section.
#8601) # Description Backports the remaining fix from #8600 for NVBug 6916688 to `release/3.0.0`. PR #8498 made the shared stack XR configuration optional, but robot-specific stack configs still coupled `IsaacTeleopCfg` construction to `env_cfg.xr`. Pick-place and locomanipulation configs also continued to import `isaaclab_teleop` eagerly. This backport: - centralizes the optional-package availability check for contributed teleop configs; - preserves stack viewport and SO-101 leader-arm teleoperation when `xr=None`; - forwards `xr_cfg` only when explicitly configured; - defers teleop, XR camera-feed, and haptic configuration imports in all pick-place and locomanipulation configs; - keeps G1 contact reporting enabled for always-present hand contact sensors even without teleop; and - dynamically covers all 31 registrations from the stack, pick-place, and locomanipulation task packages. No new dependencies are required. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Screenshots Not applicable. ## Validation - All 31 registered stack, pick-place, and locomanipulation configs resolve and validate with `isaaclab_teleop` blocked - Both locomanip G1 configs retain their hand contact sensors and robot contact reporters without teleop\n- All 31 teleop-installed config trees match the corresponding target-branch configs - Five representative stack configs with `xr=None` retain `IsaacTeleopCfg` and its default XR/session config - All seven pick-place and locomanipulation configs retain Isaac Capture configuration with the teleop extra installed - `uv run python -m pytest source/isaaclab_tasks/test/core/test_env_cfg_no_forbidden_imports.py -q` (`49 passed`) - `uv run --extra teleop python -m pytest source/isaaclab_tasks/test/core/test_xr_camera_feed_presets.py -q` (`6 passed`) - `uv run isaaclab --format` - `git diff --check` ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks with `uv run isaaclab --format` - [x] Documentation changes are not required for this dependency-loading fix - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the test-audit criteria - [x] I have added a changelog fragment under `source/isaaclab_tasks/changelog.d/` - [x] My name already exists in `CONTRIBUTORS.md`
Description
Backports the optional stack teleop dependency fix for NVBug 6916688.
StackEnvCfgeagerly imported the legacyXrCfgcompatibility export, which forwards to the optionalisaaclab_teleoppackage. As a result, non-teleop stack tasks such asIsaacContrib-Stack-Cube-Franka-IK-Rel-Blueprintfailed during configuration loading when the base orisaacsimextras were used without teleop.This change defers creation of the default XR configuration. It preserves the existing XR defaults when
isaaclab_teleopis installed, returnsNoneonly when that package itself is unavailable, and re-raises unrelated transitive import failures. The regression test loads the exact task reported in the NVBug while deliberately blockingisaaclab_teleop.Type of change
Validation
ruff checkon the changed Python filesruff format --checkon the changed Python filesupstream/release/3.0.0git diff --checkThe focused pytest test could not run locally because the
release/3.0.0lockfile supports Linux and Windows only, while the available host is macOS. PR CI is required for the runtime result.Checklist
uv run isaaclab --format(the project environment rejects macOS; equivalent changed-file hooks passed)isaaclab_tasksCONTRIBUTORS.md