Skip to content

Refactor cartpole tasks, make presets available to direct envs - #5930

Merged
ooctipus merged 7 commits into
isaac-sim:developfrom
StafaH:mh/cartpole_overhaul2
Jun 3, 2026
Merged

ooctipus merged 7 commits into
isaac-sim:developfrom
StafaH:mh/cartpole_overhaul2

Conversation

@StafaH

@StafaH StafaH commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context.
List any dependencies that are required for this change.

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)
  • Documentation update

Screenshots

Please attach before and after screenshots of the change if applicable.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the pre-commit checks with ./isaaclab.sh --format
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the changelog and the corresponding version in the extension's config/extension.toml file
  • I have added my name to the CONTRIBUTORS.md or my name already exists there

@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Jun 3, 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.

Code Review: PR #5930 - Refactor cartpole tasks, make presets available to direct envs

Thanks for this cleanup, @StafaH! This is a substantial refactor that consolidates the cartpole camera environments and adds proper RSL-RL vision training support. I've reviewed the changes across all 31 files. Here's my assessment:

✅ What I Like

  1. Consolidation is well-executed: Merging CartpoleCameraPresetsEnv into CartpoleCameraEnv and having the camera env inherit from CartpoleEnv eliminates significant code duplication. The reward/termination/reset logic is now shared properly.

  2. Channel-first output is the right call: Switching from [H, W, C] to [C, H, W] output matches what CNN policies (rsl_rl, rl_games, skrl) expect. The changelog documents this breaking change appropriately.

  3. The custom CNNModel fix is clean: The isaaclab_rl.rsl_rl.models.CNNModel override to support image-only observations (no 1D groups) is a minimal, surgical fix for the upstream rsl-rl limitation.

  4. The permute parameter in mdp.image(): Nice addition to let manager-based envs opt into channel-first output at the observation term level.


🔍 Issues & Suggestions

1. Missing newline at EOF (Minor)

# source/isaaclab_tasks/isaaclab_tasks/core/cartpole/agents/rsl_rl_ppo_cfg.py
    )
# ^ File ends without newline

2. Unused cart_pos removal in reward function looks intentional but undocumented

-            self.joint_pos[:, self._cart_dof_idx[0]],
             self.joint_vel[:, self._cart_dof_idx[0]],

The compute_rewards function no longer receives cart_pos, but this parameter was never used in the reward computation anyway (rew_scale_cart_vel uses velocity, not position). This is fine, but worth noting that it's a signature cleanup rather than a behavior change.

3. Potential type annotation inconsistency

In cartpole_direct_camera_env.py, the cfg type annotation:

cfg: CartpoleCameraEnvCfg

But CartpoleCameraEnvCfg is now a PresetCfg wrapper that resolves to BaseCartpoleCameraEnvCfg. After preset resolution, the actual type would be BaseCartpoleCameraEnvCfg. Consider whether the type hint should reflect the resolved type.

4. The showcase cartpole_camera now duplicates base cfg fields

# contrib/cartpole_showcase/cartpole_camera/cartpole_camera_env_cfg.py
class CartpoleCameraEnvCfg(DirectRLEnvCfg):
    # env
    decimation = 2
    episode_length_s = 5.0
    action_scale = 100.0  # [N]
    ...

Since the core CartpoleEnvCfg now shares physics via CartpolePhysicsCfg, the showcase variant could potentially inherit from the refactored base instead of redeclaring everything. Not blocking, but worth considering for future consolidation.

5. Frame stack channel math changed from last-dim to first-dim

The old code:

cfg.observation_space = [*cfg.observation_space[:-1], single_channels * cfg.frame_stack]

The new code:

cfg.observation_space = [single_channels * frame_stack, *cfg.observation_space[1:]]

This is correct for the channel-first change, but the stacking logic in _get_observations should be verified end-to-end (I see the tests were updated, which is good).

6. Attribute access changed from self._cartpole to self.cartpole

# In cartpole_camera_showcase_env.py
-        self._cartpole.set_joint_effort_target_index(...)
+        self.cartpole.set_joint_effort_target_index(...)

This change makes the attribute public. Is this intentional API exposure, or just matching the parent class? Worth documenting if it's meant to be part of the public interface.


📝 Documentation Observations

The changelog entries are thorough and explain the breaking changes well. The tutorial doc update for rsl_rl_manager_ppo_cfg → rsl_rl_ppo_cfg is correct.


🧪 Testing

The test updates in test_cartpole_camera_presets_frame_stack.py properly reflect the class rename and the channel-first observation format. The shape assertions were correctly updated:

expected_shape = (env.num_envs, expected_channels, env_cfg.tiled_camera.height, env_cfg.tiled_camera.width)

Summary

This is a solid refactoring PR that improves code organization and adds valuable RSL-RL CNN support. The main concerns are minor (missing newline, potential type annotation refinement). The breaking change to channel-first output is well-documented.

Recommendation: Address the EOF newline and consider the type annotation refinement, but otherwise this looks ready for merge once CI passes.


Review by IsaacLab Review Bot 🤖


🔄 Update (2025-06-03) — Reviewed new commits up to 81254cf

New changes are minor cleanup — no new issues introduced:

  • ✅ Relative imports converted to absolute imports across cartpole modules (consistent style)
  • ✅ Class renamed CartpoleCameraPresetsEnvCfg → CartpoleCameraEnvCfg with matching entry point update in __init__.py
  • ✅ Minor formatting improvements (blank lines between code blocks in cartpole_direct_env.py)
  • ✅ Docstring in CartpoleCameraEnv simplified

Previous concerns status: All original suggestions still apply (minor items, non-blocking). No regressions from the new commits.

LGTM on the incremental changes. 👍


🔄 Update (2026-06-03 06:49 UTC) — Reviewed commit 67ef71b

Single new commit adds missing changelog fragments:

  • ✅ cartpole-image-permute.minor.rst (isaaclab) — Documents the new permute argument for the mdp.image() observation term. Correctly describes the channel-first layout option.
  • ✅ cartpole-overhaul-viz-test.skip (isaaclab_visualizers) — Correctly skips changelog entry for test-only import updates.

These are exactly what the changelog-check CI was flagging. No code changes, no new issues.

Previous concerns status: All original minor items (EOF newline, type annotation refinement) remain non-blocking. LGTM. 👍


🔄 Update: Reviewed new commits (67ef71ba → dd6be969)

New commits move sim_launcher.py from isaaclab_tasks.utils to isaaclab.app (yielding PhysicsCfg from context manager), add RTX scene partitioning across all Kit app files, refactor the manager-based cartpole camera env to a preset-driven pattern, and update TacSL sensor demo to use isaaclab_physx imports. Version bumps across multiple packages (isaaclab 6.2.1, isaaclab_physx 1.1.2, isaaclab_newton 0.14.1, isaaclab_ovphysx 3.0.1, isaaclab_tasks 2.0.1, isaaclab_visualizers 0.1.1).

No new issues found in the incremental changes — these are clean mechanical refactors and import-path migrations.

Previous inline comments remain outstanding (not addressed in this push):

  • P1: In-place mutation of depth sensor buffer
  • P2: experiment_name change breaking checkpoint resumption

🔄 Update (2026-06-03 07:23 UTC) — Reviewed commits dd6be96 → 32c6730

Two files changed — introduces dedicated RSL-RL runner config subclasses for direct envs:

  • ✅ P2 Fixed: experiment_name breakage resolved. New CartpoleDirectPPORunnerCfg (experiment_name = "cartpole_direct") and CartpoleCameraDirectPPORunnerCfg (experiment_name = "cartpole_camera_direct") subclasses created, and direct-env registrations in __init__.py now point to them. Existing checkpoints will continue to resolve correctly.

Remaining: P1 (in-place depth buffer mutation) is still outstanding but non-blocking.

No new issues in this push. Clean fix. 👍

StafaH added 2 commits June 2, 2026 23:25
Adds the missing changelog fragments flagged by the changelog-check CI:
a minor-bump entry for the new permute argument on the image observation
in isaaclab, and a skip fragment for the test-only import update in
isaaclab_visualizers.
@StafaH
StafaH marked this pull request as ready for review June 3, 2026 06:49
@greptile-apps

greptile-apps Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR refactors the cartpole task suite to unify direct and manager-based environments under shared PresetCfg hierarchies for physics backends and camera observation pipelines, eliminating per-variant duplicates (RGB, depth, feature) in favour of runtime-selectable presets.

  • Core/contrib split: The core/cartpole direct-camera env is now NCHW channel-first throughout (config, env, frame-stack buffer, rsl-rl CNN model), while the contrib/cartpole_showcase camera env is intentionally kept NHWC by fully overriding _get_observations.
  • Frame-stack & CNNModel: CartpoleCameraEnv gains frame_stack support via CircularBuffer; a new isaaclab_rl.rsl_rl.models:CNNModel subclass is introduced to support image-only policies without 1D observation groups.

Confidence Score: 4/5

Safe to merge after fixing the in-place depth buffer mutation; the experiment_name change is a usability concern but not a blocker.

One P1 defect (depth tensor in-place mutation corrupts the sensor cache) and one P2 concern (experiment_name change breaks checkpoint resumption for direct-env users). The rest of the refactor is structurally sound: the PresetCfg hierarchy, NCHW channel convention, frame-stack CircularBuffer, and new CNNModel subclass all look correct. The contrib showcase env intentionally stays NHWC with a full _get_observations override, which is self-consistent. Score docked one point for the P1 depth bug.

cartpole_direct_camera_env.py (depth in-place mutation), agents/rsl_rl_ppo_cfg.py (experiment_name)

Important Files Changed

Filename Overview
source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_camera_env.py New unified camera env with frame-stack support; depth path mutates sensor buffer in-place (P1 bug).
source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_camera_env_cfg.py Replaces per-datatype cfg subclasses with PresetCfg hierarchy; observation_space now channel-first [C,H,W].
source/isaaclab_rl/isaaclab_rl/rsl_rl/models.py New CNNModel subclass supporting image-only policies (no 1D obs groups) by conditionally skipping MLPModel.get_latent.
source/isaaclab_rl/isaaclab_rl/rsl_rl/rl_cfg.py class_name updated to fully-qualified 'isaaclab_rl.rsl_rl.models:CNNModel' for the new model subclass.
source/isaaclab_tasks/isaaclab_tasks/core/cartpole/agents/rsl_rl_ppo_cfg.py Unified PPO runner configs; experiment_name changed from 'cartpole_direct' to 'cartpole' (breaks existing checkpoint paths).
source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_direct_env.py Removed dead cart_pos parameter from compute_rewards JIT kernel; CartpoleEnv now shared base for proprioceptive and camera variants.
source/isaaclab/isaaclab/envs/mdp/observations.py Added permute: bool = False to image() to support optional NHWC→NCHW conversion at observation pipeline level.
source/isaaclab_tasks/isaaclab_tasks/contrib/cartpole_showcase/cartpole_camera/cartpole_camera_env.py Fixed self._cartpole → self.cartpole API rename; _get_observations returns NHWC intentionally (showcase variant).
source/isaaclab_tasks/isaaclab_tasks/core/cartpole/cartpole_manager_camera_env_cfg.py Added permute=True to RGB/depth ObsTerms so manager-based camera env also outputs NCHW.
source/isaaclab_tasks/test/core/test_cartpole_camera_presets_frame_stack.py Test updated for new class names and NCHW channel-first shape assertions.

Reviews (1): Last reviewed commit: "Add changelog fragments for cartpole tas..." | Re-trigger Greptile

Comment on lines +109 to 110
elif data_type == "depth":
camera_data[camera_data == float("inf")] = 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.

P1 In-place mutation of the sensor output buffer for depth

The boolean-mask assignment camera_data[camera_data == float("inf")] = 0 writes directly into the tensor returned by self._tiled_camera.data.output[data_type]. That tensor is owned by the sensor; mutating it corrupts the sensor's internal state for any subsequent reader in the same step (e.g. the write_image_to_file path on line 125, or a second call if the sensor data is cached). The depth branch should clone the data before modifying it.

Suggested change
elif data_type == "depth":
camera_data[camera_data == float("inf")] = 0
elif data_type == "depth":
camera_data = camera_data.clone()
camera_data[camera_data == float("inf")] = 0

Comment on lines +19 to +24
@configclass
class CartpolePPORunnerCfg(RslRlOnPolicyRunnerCfg):
num_steps_per_env = 16
max_iterations = 150
save_interval = 50
experiment_name = "cartpole"

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.

P2 experiment_name changed for direct-env variants, breaking checkpoint resumption

The deleted rsl_rl_direct_ppo_cfg.py used experiment_name = "cartpole_direct". This file sets experiment_name = "cartpole" for all variants (including the direct-env CartpolePPORunnerCfg). Any user with existing checkpoints under logs/rsl_rl/cartpole_direct/ will need to manually rename their log directory or override the field; the default training script will silently start a fresh run instead of resuming.

@ooctipus
ooctipus merged commit 09d897d into isaac-sim:develop Jun 3, 2026
37 checks passed
@StafaH
StafaH deleted the mh/cartpole_overhaul2 branch June 11, 2026 21:23
ooctipus added a commit that referenced this pull request Sep 9, 2026
#7611)

# Description

The symptoms addressed by #7045 and the now-merged #7532 are real, but
the selection mechanism grew into a parallel configuration system: task
registrations described preset-to-agent relationships, the preset CLI
rediscovered those relationships and rewrote `args.agent`, every backend
had to opt into that mutation, and the documentation browser copied the
same mapping again.

Because #7532 has since merged, this branch also fully removes its live
sentinel, second parse, mutation guard, benchmark wiring, and associated
compatibility tests. Historical compiled changelog entries remain as
release history.

This PR makes the existing preset resolver the only owner of
environment-coupled selection:

```text
presets=resnet18
        |
        v
resolve_task_config(task, <library>_cfg_entry_point)
        |
        +-- environment PresetCfg root -> ResNet18 observations
        |
        `-- agent PresetCfg root       -> feature-policy configuration
```

The Gym registry now selects a library or a genuinely independent
training recipe. A library's canonical entry point owns any agent
variants coupled to environment presets, so the same `presets=`
broadcast selects both roots in one resolution pass.

The final diff is **687 additions / 787 deletions: net -100 lines**.

## Before and after

### 1. Environment-coupled agent variants

#### Before: repeat the pairing, then teach the CLI to translate it

The camera task registered separate raw and feature agent keys, then
repeated their relationship to environment presets in another
dictionary:

```python
_RAW_CAMERA_PRESETS = ("albedo", "depth", "rgb", ...)

gym.register(
    ...,
    kwargs={
        "env_cfg_entry_point": "...:CartpoleCameraEnvCfg",
        "rsl_rl_cfg_entry_point": "...:CartpoleCameraPPORunnerCfg",
        "rsl_rl_feature_cfg_entry_point": "...:CartpoleCameraFeaturePPORunnerCfg",
        "agent_preset_compatibility": {
            "rsl_rl_cfg_entry_point": _RAW_CAMERA_PRESETS,
            "rsl_rl_feature_cfg_entry_point": ("resnet18", "theia_tiny"),
            # The same pairings were repeated for RL Games.
        },
    },
)
```

The showcase tasks amplified this into one registry key per
observation/action-space combination—24 noncanonical SKRL keys across
the two tasks—plus another compatibility map:

```python
"skrl_cfg_entry_point": "...:skrl_box_box_ppo_cfg.yaml",
"skrl_box_box_cfg_entry_point": "...:skrl_box_box_ppo_cfg.yaml",
"skrl_box_discrete_cfg_entry_point": "...:skrl_box_discrete_ppo_cfg.yaml",
"skrl_box_multidiscrete_cfg_entry_point": "...:skrl_box_multidiscrete_ppo_cfg.yaml",
# ... one key for every remaining space combination ...
"agent_preset_compatibility": {
    "skrl_cfg_entry_point": ("box_box",),
    "skrl_box_discrete_cfg_entry_point": ("box_discrete",),
    # ... repeat every pairing again ...
},
```

#### After: the canonical agent entry point is a preset root

The agent package owns the variants directly:

```python
@configclass
class CartpoleCameraPPORunnerPresetsCfg(PresetCfg):
    default = CartpoleCameraPPORunnerCfg()
    resnet18 = CartpoleCameraFeaturePPORunnerCfg()
    theia_tiny = CartpoleCameraFeaturePPORunnerCfg()

gym.register(
    ...,
    kwargs={
        "env_cfg_entry_point": "...:CartpoleCameraEnvCfg",
        "rsl_rl_cfg_entry_point": "...:CartpoleCameraPPORunnerPresetsCfg",
    },
)
```

RL Games uses the same canonical-root shape with `preset(default=...,
resnet18=..., theia_tiny=...)`. The showcase YAML family is likewise
exposed behind its sole canonical key:

```python
def skrl_cfg():
    configs = {
        path.stem.removeprefix("skrl_").removesuffix("_ppo_cfg"): load_yaml(path)
        for path in Path(__file__).parent.glob("skrl_*_ppo_cfg.yaml")
    }
    return preset(default=configs.pop("box_box"), **configs)

# Gym registration
"skrl_cfg_entry_point": f"{agents.__name__}:skrl_cfg"
```

The configurations remain, but the 26 preset-specific agent keys, three
compatibility maps, and duplicate preset-name lists do not.

### 2. Preset CLI ownership

#### Before: parse, rediscover task metadata, and mutate another
subsystem's argument

```python
def setup_preset_cli(parser, argv=None, *, agent_library=None):
    ...
    args, remaining = parser.parse_known_args(args_to_parse)
    if agent_library and task_name:
        _auto_select_agent(args, task_name, agent_library, args_to_parse)
    return args, remaining

# Every caller had to opt into the second selector.
args, remaining = setup_preset_cli(parser, agent_library="rsl_rl")
```

`_auto_select_agent` scanned raw `presets=` tokens, intersected them
with the compatibility maps, selected a different registry key, and
rewrote `args.agent`. #7532 later added a sentinel and a second argparse
pass just to decide whether that mutation was allowed to override a
parser default.

#### After: parse preset syntax and return it unchanged

```python
def setup_preset_cli(parser, argv=None):
    ...
    return parser.parse_known_args(args_to_parse)

args, remaining = setup_preset_cli(parser)
```

The preset CLI is again bounded to preset help and parsing. Agent
configuration selection happens once, inside config resolution.

### 3. Humanoid AMP and SKRL algorithm identity

#### Before: infer both the config and algorithm from CLI/key spelling

```python
# Humanoid AMP registered no canonical SKRL key.
"skrl_amp_cfg_entry_point": "...:skrl_walk_amp_cfg.yaml"

# SKRL defaulted to PPO and reconstructed meaning from registry-key text.
parser.add_argument("--algorithm", default="PPO", ...)
agent_cfg_entry_point = (
    "skrl_cfg_entry_point"
    if args_cli.algorithm.lower() == "ppo"
    else f"skrl_{args_cli.algorithm.lower()}_cfg_entry_point"
)
algorithm = agent_cfg_entry_point.split("_cfg")[0].split("skrl_")[-1].lower()
```

A plain Humanoid AMP command therefore looked for the missing
`skrl_cfg_entry_point`. #7045 compensated with a second CLI rule: if the
canonical key was absent and exactly one other key existed, mutate
`args.agent` to that key. The same key-parsing pattern also mislabeled
showcase keys such as `skrl_box_discrete_cfg_entry_point` as algorithms.

#### After: the task owns its default; the resolved config owns its
algorithm

```python
# Humanoid AMP registration
"default_agent": "skrl",
"skrl_cfg_entry_point": "...:skrl_walk_amp_cfg.yaml",
"skrl_amp_cfg_entry_point": "...:skrl_walk_amp_cfg.yaml",  # explicit --algorithm AMP

agent_cfg_entry_point = resolve_skrl_agent_cfg_entry_point(args_cli.agent, args_cli.algorithm)
env_cfg, agent_cfg = resolve_task_config(args_cli.task, agent_cfg_entry_point)
algorithm = resolve_skrl_algorithm(agent_cfg, args_cli.algorithm)  # reads agent.class
```

Omitting `--algorithm` now means “use the task's canonical SKRL config,”
not “assume PPO.” An explicit `--algorithm` still selects an independent
algorithm recipe and is checked against the resolved `agent.class`.
Train, play, benchmarks, and LEAPP all use the same rule.

### 4. Downstream consumers

| Surface | Before | After |
| --- | --- | --- |
| CLI help | `_AgentDescriptionBuilder` and `_enumerate_agents` loaded
Gym metadata and rendered compatibility pairings. | Preset help
describes selectable presets; agent selection is not duplicated in the
preset CLI. |
| Environment browser | Every generated row carried
`agentPresetCompatibility`; JavaScript searched it and injected
`--agent` into commands. | The row field and JavaScript rewrite are
gone; generated commands pass `presets=` directly. |
| Environment catalog | Treated arbitrary agent-key suffixes as
algorithms, displaying recipe names such as `FEATURE` or `BOX_DISCRETE`.
| Recognizes only explicit algorithm aliases, ignores preset/recipe
suffixes, and deduplicates canonical aliases of the same config. |
| Ray Cartpole vision jobs | Set both
`--agent=rl_games_feature_cfg_entry_point` and
`presets=resnet18/theia_tiny`. | Set only the preset. |
| Missing-config diagnostics | Split every `*_cfg_entry_point` suffix
into guessed library and algorithm labels. | Lists the exact registered
configuration keys. |
| LEAPP export | The shared parser accepted `agent_library` so the
preset CLI could mutate `args.agent`; SKRL then reconstructed the
algorithm from that key. | Uses the plain preset parser and derives SKRL
identity from the resolved `agent.class`. |
| Generated project defaults | Emitted the canonical
`<library>_cfg_entry_point` only for PPO, so non-PPO and all multi-agent
projects depended on CLI fallback. | Filters selected algorithms per
workflow and marks PPO, MAPPO, or the sole selected non-PPO recipe
canonical; the documented command resolves directly. |
| Regression tests | Preserved compatibility dictionaries and asserted
an intermediate rewritten `args.agent` value. | Assert the resolved
environment and agent configs, exact canonical registrations/minimal
variants, and absence of the rejected maps/helpers. |

### 5. Commands

Before, users either had to provide both coupled selectors explicitly or
rely on the preset CLI to synthesize the `--agent` half:

```bash
# Before: two names for one camera-feature choice
uv run isaaclab train --rl_library rsl_rl \
    --task Isaac-Cartpole-Camera \
    --agent rsl_rl_feature_cfg_entry_point presets=resnet18

# After: one preset is composed into both roots
uv run isaaclab train --rl_library rsl_rl \
    --task Isaac-Cartpole-Camera presets=resnet18
```

The same simplification applies to RL Games and the showcase space
matrix:

```bash
# Before
uv run isaaclab train --rl_library skrl \
    --task IsaacContrib-Cartpole-Showcase-Direct \
    --agent skrl_box_discrete_cfg_entry_point presets=box_discrete

# After
uv run isaaclab train --rl_library skrl \
    --task IsaacContrib-Cartpole-Showcase-Direct presets=box_discrete
```

Humanoid AMP no longer depends on an algorithm flag or the sole-entry
fallback:

```bash
# Before, without relying on CLI auto-selection
uv run isaaclab train --rl_library skrl \
    --task IsaacContrib-Humanoid-AMP-Walk-Direct --algorithm AMP

# After: the canonical task config is AMP
uv run isaaclab train --rl_library skrl \
    --task IsaacContrib-Humanoid-AMP-Walk-Direct
```

`--algorithm AMP` remains valid when an explicit algorithm selection is
desired. Generated multi-agent projects likewise use MAPPO as their
canonical SKRL config, so their documented command needs no fallback:

```bash
uv run isaaclab train --rl_library skrl --task <GENERATED-MARL-TASK>
```

## Exact lineage of the removed mechanism

The structure removed or superseded here accumulated across several PRs:

| Change | Mechanism introduced | Disposition in this PR |
| --- | --- | --- |
| #2713 | Made missing-config errors split every agent entry-point key
into inferred library and algorithm labels. | Errors now report the
exact registered keys instead of inventing semantics for their suffixes.
|
| #5605 | Added the 24 space-specific showcase SKRL keys and the
RL-Games camera feature key while consolidating preset-driven Cartpole
tasks. | Keeps those configurations under canonical agent preset roots
and removes their preset-specific registry keys. |
| #5879 | Made the generated environment catalog infer algorithm labels
from arbitrary entry-point suffixes and, for RL-Games vision, from the
config path. | Catalog generation recognizes only the known algorithm
aliases and ignores preset/recipe suffixes. |
| #5904 | Added Ray camera-feature jobs that specified both
`--agent=rl_games_feature_cfg_entry_point` and
`presets=resnet18/theia_tiny`. | Ray selects each feature pipeline with
the preset alone. |
| #5930 | Added the separate `rsl_rl_feature_cfg_entry_point` for
pretrained camera features. | The canonical RSL-RL root owns its raw and
feature-policy variants. |
| #6553 and #6564 | Made SKRL train/play and benchmark entry points
default `--algorithm` to PPO, select a registry key from that default,
and reconstruct algorithm identity from explicit key suffixes. | An
omitted algorithm resolves the task's canonical config first; the
resolved `agent.class` is authoritative everywhere. |
| #6677 | Added three `agent_preset_compatibility` maps, duplicate
`_SPACE_PRESETS` / `_RAW_CAMERA_PRESETS` lists, `setup_preset_cli(...,
agent_library=...)`, `_AgentDescriptionBuilder`, `_enumerate_agents`,
and `agent_library=` plumbing in all eight unified RL train/play entry
points. It also added help, docs, and tests around those pairings. |
Deletes the maps, duplicate lists, agent-aware preset CLI API/helpers,
call-site plumbing, and preservation tests. |
| #6779 | Extended `agent_library` into the shared LEAPP export parser
and added another SKRL helper that inferred the algorithm from the agent
key. | Removes that parser parameter/helper and resolves algorithm
identity from the loaded config. |
| #7045 | Promoted the compatibility metadata from help text into
runtime control with `_auto_select_agent`, raw `presets=` scanning,
declared-domain filtering, preset-to-key matching, post-parse
`args.agent` mutation, and a sole-noncanonical-agent fallback for
Humanoid AMP. It also wired the two SKRL benchmark entry points. |
Deletes both selection rules and their benchmark wiring. Presets compose
the environment and agent roots directly; AMP is registered canonically.
|
| #7160 | Copied `agent_preset_compatibility` into the generated
environment-browser row schema and used it in JavaScript to inject a
preset-specific `--agent` into generated commands. | Removes the
compatibility column and browser-side command rewrite. |
| #7532 (merged) | Added `_AGENT_UNSET`, a second argparse pass in
`_agent_passed_explicitly`, a looser mutation guard, six
RSL-RL/RL-Games/SB3 benchmark train/play wirings, and tests for
rewritten `args.agent` values and explicit-flag spellings. | Fully
reverts its live implementation: there is no agent-key mutation to
guard, no backend-specific preset-CLI wiring to propagate, and no
preservation test for that removed behavior. |

This is therefore more than an alternative fix for two symptoms: it
removes the parallel preset-to-agent selection system end to end.

## Intentional compatibility removal

No warning-only or no-op compatibility shim is retained for:

- `agent_preset_compatibility`
- preset-specific agent keys such as `rsl_rl_feature_cfg_entry_point`
and the showcase space-specific SKRL keys
- `setup_preset_cli(..., agent_library=...)`

The separately named `pretrained_checkpoint_preset_compatibility`
metadata from #7630 is intentionally retained: it declares which
preset-specific checkpoint artifacts exist and never selects an agent
entry point.

Keeping those aliases would preserve the duplicate ownership this
refactor removes. Commands using a preset-specific key should remove
`--agent=<preset-specific-key>` and use the canonical library selection
plus `presets=<name>`, as shown above.

Older SKRL runs may have encoded a configuration-key suffix such as
`box_discrete` as the algorithm in a run directory or manifest. The
corrected identity is the resolved `agent.class` (`PPO` in that
example), so automatic `latest` / `best` discovery cannot safely match
those historical runs. Pass their checkpoint path explicitly.

## Type of change

- Bug fix
- Architecture refactor
- Intentional removal of recently introduced compatibility APIs
- Documentation update

## Validation

The four-case composition regression was also run against an untouched
`develop` worktree. All four cases failed there because the environment
preset changed while the canonical agent stayed at its default; all four
pass on this branch.

- Preset composition, CLI, RL entrypoint, generator, and benchmark
adapter/API tests: **148 passed**
- Pretrained-checkpoint metadata tests: **12 passed**
- Environment documentation tests: **35 passed**
- LEAPP selector/checkpoint tests: **11 passed, 1 skipped**
- Environment browser generation: up to date for **137** training
environments
- JavaScript syntax, pre-commit hooks for all PR files, changelog
validation against current `upstream/develop`, centralized structure
audit, and `git diff --check`: passed

No GPU simulation or full training job was run; the regression is
exercised at configuration composition and entrypoint boundaries before
environment construction.

The generated environment-browser refresh also incorporates the current
physics selectors for the two DrLegs rows.

## Release backport

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

## Screenshots

Not applicable.

## Checklist

- [x] I have read and understood the contribution guidelines
- [x] I have run the pre-commit checks with `uv run --frozen isaaclab
-f`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove the fix is effective
- [x] I have added changelog fragments for every touched package
- [x] My name already exists in `CONTRIBUTORS.md`
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