Skip to content

Fix skrl drone-ARL configs using STATES instead of OBSERVATIONS#5613

Merged
kellyguo11 merged 3 commits into
isaac-sim:developfrom
pascal-roth:proth/fix-skrl-drone-arl-states-input
May 15, 2026
Merged

Fix skrl drone-ARL configs using STATES instead of OBSERVATIONS#5613
kellyguo11 merged 3 commits into
isaac-sim:developfrom
pascal-roth:proth/fix-skrl-drone-arl-states-input

Conversation

@pascal-roth
Copy link
Copy Markdown
Collaborator

Summary

  • Training/playing the drone-ARL skrl tasks (Isaac-TrackPositionNoObstacles-ARL-Robot-1-*, Isaac-Navigation-3DObstacles-ARL-Robot-1-*) crashed at Runner(env, agent_cfg) with AttributeError: 'NoneType' object has no attribute 'shape' in LazyLinear.initialize_parameters.
  • Root cause: the two drone-ARL skrl YAMLs declare input: STATES for the policy and value networks. In skrl 2.0 the model instantiator now resolves STATES against state_space, which is None for single-agent envs, so the generated compute() calls self.mlp_container(None) and the first LazyLinear raises on input.shape[-1].
  • Switched both configs to input: OBSERVATIONS, matching every other single-agent skrl config in IsaacLab. The two multi-agent MAPPO configs that legitimately use STATES (direct/shadow_hand_over, direct/cart_double_pendulum) are unaffected.

Files changed

  • source/isaaclab_tasks/.../drone_arl/track_position_state_based/config/arl_robot_1/agents/skrl_ppo_cfg.yaml
  • source/isaaclab_tasks/.../drone_arl/navigation/config/arl_robot_1/agents/skrl_rough_ppo_cfg.yaml
  • source/isaaclab_tasks/changelog.d/proth-fix-skrl-drone-arl-states-input.rst (patch fragment)

Test plan

  • Reproduced the exact stack trace (<string> line 48 → container.py:253lazy.py:263linear.py:323) with input: STATES using a standalone skrl shared_model instantiation against a single-agent obs/action space.
  • After the YAML change, the same standalone instantiation loads both edited YAMLs from disk and successfully runs init_state_dict(role='policy') and init_state_dict(role='value') on a SharedModel.
  • ./isaaclab.sh -f (pre-commit) passes locally.
  • Full end-to-end train.py/play.py smoke test against:
    • Isaac-TrackPositionNoObstacles-ARL-Robot-1-v0
    • Isaac-TrackPositionNoObstacles-ARL-Robot-1-Play-v0 --use_pretrained_checkpoint
    • Isaac-Navigation-3DObstacles-ARL-Robot-1-v0

The drone-ARL skrl configs (track_position_state_based and navigation)
specified `input: STATES` for the policy and value networks. In skrl
2.0 the model instantiator resolves `STATES` against `state_space`,
which is `None` for single-agent environments. The generated
`compute()` method then called `self.mlp_container(None)`, raising
`AttributeError: 'NoneType' object has no attribute 'shape'` from
LazyLinear's parameter initialization.

Switch both configs to `input: OBSERVATIONS`, matching every other
single-agent skrl config in IsaacLab. The two multi-agent MAPPO configs
that legitimately use `STATES` (shadow_hand_over, cart_double_pendulum)
are unaffected.
@pascal-roth pascal-roth requested a review from Mayankm96 as a code owner May 14, 2026 13:15
@github-actions github-actions Bot added bug Something isn't working isaac-lab Related to Isaac Lab team labels May 14, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 14, 2026

Greptile Summary

This PR fixes a crash in the drone-ARL skrl training configs where input: STATES caused an AttributeError because skrl 2.0 resolves STATES against state_space, which is None in single-agent environments. Both affected YAML configs are updated to use input: OBSERVATIONS, consistent with all other single-agent skrl configs in the repository.

  • Both skrl_rough_ppo_cfg.yaml (navigation) and skrl_ppo_cfg.yaml (track position) replace STATES with OBSERVATIONS for the MLP input in the policy and value network definitions.
  • A changelog fragment documents the root cause and resolution clearly.

Confidence Score: 5/5

Safe to merge — the change is a targeted one-line fix per config that restores the correct skrl input key for single-agent environments.

Both YAMLs now use OBSERVATIONS, consistent with every other single-agent skrl config in the repo. The root cause is well-understood (skrl 2.0 resolves STATES against state_space, which is None for single-agent envs), the fix is minimal, and the changelog fragment documents it accurately. The only gap is the full end-to-end smoke test noted as pending in the PR description, but the standalone validation described in the test plan covers the crash path directly.

No files require special attention.

Important Files Changed

Filename Overview
source/isaaclab_tasks/isaaclab_tasks/manager_based/drone_arl/navigation/config/arl_robot_1/agents/skrl_rough_ppo_cfg.yaml Changes input: STATESinput: OBSERVATIONS for both policy and value MLP networks; correct fix for single-agent skrl 2.0 environments where state_space is None.
source/isaaclab_tasks/isaaclab_tasks/manager_based/drone_arl/track_position_state_based/config/arl_robot_1/agents/skrl_ppo_cfg.yaml Same STATESOBSERVATIONS fix as the navigation config; the state_based in the task directory name refers to the observation type, not the skrl input key.
source/isaaclab_tasks/changelog.d/proth-fix-skrl-drone-arl-states-input.rst New changelog fragment accurately describes the bug, root cause (skrl 2.0 resolving STATES against None state_space), and the fix.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[skrl Runner init] --> B{Resolve model input key}
    B -->|STATES| C[Look up state_space]
    B -->|OBSERVATIONS| D[Look up observation_space]
    C --> E{state_space is None?\nSingle-agent env}
    E -->|Yes - before fix| F["compute() calls mlp(None)\nLazyLinear raises AttributeError"]
    E -->|No - multi-agent env| G[Model initializes successfully]
    D --> H[observation_space has valid shape]
    H --> I[Model initializes successfully]

    style F fill:#ff6b6b,color:#fff
    style I fill:#51cf66,color:#fff
    style G fill:#51cf66,color:#fff
Loading

Reviews (1): Last reviewed commit: "Fix skrl drone-ARL configs using STATES ..." | Re-trigger Greptile

Copy link
Copy Markdown

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

Choose a reason for hiding this comment

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

Review Summary

This is a well-scoped fix for a runtime crash in the drone-ARL skrl configurations. The root cause analysis is accurate and the solution is correct.

✅ What Looks Good

  • Correct diagnosis: The STATES input type resolves against state_space, which is None for single-agent environments in skrl 2.0
  • Appropriate fix: Switching to OBSERVATIONS maps to observation_space, which is properly defined
  • Consistency: Change aligns with all other single-agent skrl configs in the codebase
  • Minimal scope: Only the affected YAML configs are modified, no unnecessary changes
  • Good changelog entry: Clear description of the bug and fix

📋 Suggestions

Severity Finding
💡 Suggestion Consider adding a brief comment in the YAML files explaining why OBSERVATIONS is used instead of STATES for single-agent envs — this would help prevent future regressions if someone copies these configs

🧪 Testing Notes

  • The standalone skrl model instantiation tests described in the PR are sufficient to verify the fix
  • CI will validate that the configs load correctly
  • The unchecked e2e train/play tests in the PR description are nice-to-have but not blocking for this config-only fix

Verdict: Approve — straightforward bug fix with correct solution.


Update (3ffe521): New commits add LEAPP documentation improvements (install instructions, tutorial clarifications). These are unrelated to the original YAML config fix and look good. Original approval stands.


Update (bb5df95): ⚠️ This commit appears to contain a large number of changes unrelated to the original PR scope (skrl drone-ARL config fix):

  • Refactored LEAPP RSL-RL export script with deferred imports and better error handling
  • Fixed create_rotation_matrix_from_view singularity when look-at is parallel to up axis
  • Fixed quat_from_matrix to return NaN for non-rotation input
  • Fixed Camera.set_world_poses_from_view and RayCasterCamera.set_world_poses_from_view to handle degenerate eye==target cases
  • Fixed AppLauncher CUDA device setup timing issue
  • Fixed PVA sensor debug visualizer for zero-acceleration bodies
  • Version bumps (isaaclab 5.2.1, isaaclab_newton 0.9.1, isaaclab_physx 0.7.1)
  • CI test runner improvements
  • Import cleanup in various modules

These changes look correct individually but dramatically expand the PR scope beyond the original "fix skrl drone-ARL configs" intent. Consider splitting into separate PRs for cleaner review and changelog tracking. Original YAML config fix approval still stands.

@kellyguo11 kellyguo11 merged commit ef6c178 into isaac-sim:develop May 15, 2026
33 of 34 checks passed
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.

2 participants