Skip to content

Remove isaaclab_tasks dependency from core test files - #6922

Open
mataylor-nvidia wants to merge 3 commits into
isaac-sim:developfrom
mataylor-nvidia:mataylor/remove-isaaclab-tasks-from-core-tests
Open

Remove isaaclab_tasks dependency from core test files#6922
mataylor-nvidia wants to merge 3 commits into
isaac-sim:developfrom
mataylor-nvidia:mataylor/remove-isaaclab-tasks-from-core-tests

Conversation

@mataylor-nvidia

Copy link
Copy Markdown

Summary

  • test_outdated_sensor.py: Rewrote with an inline ManagerBasedRLEnvCfg using FRANKA_PANDA_CFG + FrameTransformerCfg (both core); dropped gym.make, parse_env_cfg, and task_name parametrize. Renamed test function to test_eef_pos_not_stale_after_reset to reflect actual behaviour.
  • test_action_state_recorder_term_task_integration.py: Replaced the Franka lift task with an inline CartpoleEnvCfg; ActionStateRecorderManagerCfg is already a core import so no task dependency remains.
  • test_manager_based_rl_env_obs_spaces_task_integration.py: Replaced CartpoleEnvCfg, CartpoleCameraEnvCfg, AnymalCRoughEnvCfg, and resolve_presets with inline cfgs backed by CARTPOLE_CFG. The clip-to-obs-space-bounds test now uses a mixed clipped/unclipped joint obs cfg — the tested logic is obs-type-agnostic so no camera or ray-caster env is needed.
  • test_tiled_camera_env.py: Moved isaaclab_tasks imports inside _launch_tests (all test functions are @pytest.mark.skip so the helper is never called at module load time).
  • test_pink_ik.py + test_ik_configs/: Moved to source/isaaclab_tasks/test/controllers/ — the test is inseparable from GR1T2/G1 robot-specific Pink IK action term internals.

Test plan

  • uv run isaaclab -f passes (pre-commit clean)
  • test_outdated_sensor.py exercised in isaacsim CI via @pytest.mark.isaacsim_ci
  • test_action_state_recorder_term_task_integration.py exercised in integration CI
  • test_manager_based_rl_env_obs_spaces_task_integration.py exercised in integration CI
  • test_pink_ik.py discovered by CI basename lookup (CI uses TEST_INCLUDE_FILES by filename, not path)

Rewrite four tests in source/isaaclab/test/ that unnecessarily imported
isaaclab_tasks to load registered tasks via parse_env_cfg and gym.make:

- test_outdated_sensor.py: replace Franka stack task with an inline
  ManagerBasedRLEnvCfg using FRANKA_PANDA_CFG and FrameTransformerCfg;
  rename test function to reflect actual behaviour (eef_pos staleness).
- test_action_state_recorder_term_task_integration.py: replace Franka
  lift task with an inline CartpoleEnvCfg; ActionStateRecorderManagerCfg
  is already a core import and scene.get_state() always returns both
  articulation and rigid_object keys so compare_states works unchanged.
- test_manager_based_rl_env_obs_spaces_task_integration.py: replace
  CartpoleEnvCfg, CartpoleCameraEnvCfg, AnymalCRoughEnvCfg, and
  resolve_presets with inline cfgs backed by CARTPOLE_CFG; the clip-to-
  obs-space-bounds test uses a mixed clipped/unclipped joint obs cfg
  rather than camera or ray-caster envs, since the tested logic is
  identical for all obs term types.
- test_tiled_camera_env.py: move isaaclab_tasks imports inside the
  _launch_tests helper (all tests are @pytest.mark.skip, so the helper
  never executes at module load time).

Move test_pink_ik.py and its test_ik_configs/ data directory to
source/isaaclab_tasks/test/controllers/ because the test is inseparable
from the GR1T2/G1 robot-specific Pink IK action term internals; the
Path(__file__).parent reference is unchanged.
@mataylor-nvidia
mataylor-nvidia requested a review from a team August 5, 2026 18:13
@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Aug 5, 2026
@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR removes isaaclab_tasks dependencies from core tests by replacing task-backed fixtures with inline core environment configurations, deferring skipped-test imports, and relocating task-specific Pink IK tests.

  • Adds minimal Cartpole configurations for recorder and observation-space integration tests.
  • Adds a minimal Franka frame-transformer environment for reset freshness coverage.
  • Moves robot-specific Pink IK tests and fixtures into isaaclab_tasks.
  • Defers tiled-camera task imports until the skipped helper executes.

Confidence Score: 5/5

The PR appears safe to merge with no concrete changed-code defect identified.

The inline environments satisfy the manager and sensor configuration contracts exercised by these tests, recorder callbacks remain available under direct construction, and the relocated or deferred task dependencies remain on valid paths.

Important Files Changed

Filename Overview
source/isaaclab/test/envs/test_action_state_recorder_term_task_integration.py Replaces the registered Franka task with a directly constructed Cartpole environment while preserving recorder reset and partial-reset coverage.
source/isaaclab/test/envs/test_manager_based_rl_env_obs_spaces_task_integration.py Replaces task configurations with inline Cartpole observation configs that retain non-concatenated-term and clipped-bound assertions.
source/isaaclab/test/sensors/test_outdated_sensor.py Rebuilds the stale frame-transformer regression test around a core Franka scene whose reset state and idle action targets are aligned.
source/isaaclab/test/sensors/test_tiled_camera_env.py Moves task-only imports into the helper reached exclusively by currently skipped tests.
source/isaaclab_tasks/test/controllers/test_pink_ik.py Relocates the unchanged robot-specific Pink IK test and its configuration fixtures into the task package.

Reviews (1): Last reviewed commit: "Remove isaaclab_tasks dependency from co..." | Re-trigger Greptile

@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

The test dependency refactor appropriately removes task-package imports from core test modules and relocates the task-specific Pink IK coverage, but the rewritten FrameTransformer regression test no longer changes the robot pose during reset, making its stale-data assertion ineffective.

  • Design and architecture: The dependency direction is improved: core tests use private inline configurations backed by isaaclab and isaaclab_assets, while robot-specific Pink IK coverage moves to isaaclab_tasks. The stale-sensor test configuration needs adjustment so its reset actually exercises cache invalidation.
  • API: No public symbols, exports, CLI arguments, or configuration contracts are changed. The added environment configuration classes are private to their test modules, and both touched packages include .skip changelog fragments.
  • Implementation: The FrameTransformer test resets every joint with zero position and velocity offsets, leaving the robot at its existing default pose; the subsequent idle action also preserves that pose. Consequently, stale and freshly updated end-effector observations are numerically indistinguishable. The reset must move the robot to a demonstrably different pose before comparing reset-time and first-step observations.

Minor fixes needed. Posted 1 actionable finding inline.

Automated review; human maintainers own approval decisions.

mode="reset",
params={
"asset_cfg": SceneEntityCfg("robot"),
"position_range": (0.0, 0.0),

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 · Implementation — Zero-range reset makes staleness assertion vacuous

reset_robot uses position_range/velocity_range of (0.0, 0.0), so the reset writes exactly the spawn/default joint state the FrameTransformer cache was already populated with, and idle JointPositionAction holds that pose. A stale post-reset sensor read is then numerically identical to a fresh one, so assert_close(pre_reset_eef_pos, post_reset_eef_pos) passes even if reset-time cache invalidation regresses. Use a non-zero position range so the post-reset pose differs.

@mataylor-nvidia

Copy link
Copy Markdown
Author

Note on test_tiled_camera_env.py

This file was originally included in this PR with its isaaclab_tasks imports moved inside the _launch_tests helper function as a workaround. On reflection, that was the wrong approach — moving the import inside still keeps the dependency alive in dead code.

Every test in the file carries @pytest.mark.skip(reason="Currently takes too long to run"), so the helper functions are never executed and the file contributes zero coverage. Rather than patch it, the file has been deleted in the latest commit. If these tiled-camera resolution sweep tests are ever un-skipped, they should be rewritten at that point with an inline DirectRLEnvCfg + CameraCfg (both in core) to avoid pulling in isaaclab_tasks.

…tests

Signed-off-by: Matthew Taylor <mataylor@nvidia.com>


@configclass
class _SceneCfg(InteractiveSceneCfg):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

does the env cfg used in both tests matter? maybe it can be put in a test util file so it can be reused. also helps avoid the long import list at the file top

@@ -1,142 +0,0 @@
# Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why this is removed?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is the reason fro the move parse_env_cfg? wondering if the -tasks dependency can be removed instead of move.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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