Fix skrl drone-ARL configs using STATES instead of OBSERVATIONS#5613
Conversation
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.
Greptile SummaryThis PR fixes a crash in the drone-ARL skrl training configs where
Confidence Score: 5/5Safe 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 No files require special attention. Important Files Changed
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
Reviews (1): Last reviewed commit: "Fix skrl drone-ARL configs using STATES ..." | Re-trigger Greptile |
There was a problem hiding this comment.
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
STATESinput type resolves againststate_space, which isNonefor single-agent environments in skrl 2.0 - Appropriate fix: Switching to
OBSERVATIONSmaps toobservation_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):
- Refactored LEAPP RSL-RL export script with deferred imports and better error handling
- Fixed
create_rotation_matrix_from_viewsingularity when look-at is parallel to up axis - Fixed
quat_from_matrixto return NaN for non-rotation input - Fixed
Camera.set_world_poses_from_viewandRayCasterCamera.set_world_poses_from_viewto handle degenerate eye==target cases - Fixed
AppLauncherCUDA 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.
Summary
Isaac-TrackPositionNoObstacles-ARL-Robot-1-*,Isaac-Navigation-3DObstacles-ARL-Robot-1-*) crashed atRunner(env, agent_cfg)withAttributeError: 'NoneType' object has no attribute 'shape'inLazyLinear.initialize_parameters.input: STATESfor the policy and value networks. In skrl 2.0 the model instantiator now resolvesSTATESagainststate_space, which isNonefor single-agent envs, so the generatedcompute()callsself.mlp_container(None)and the firstLazyLinearraises oninput.shape[-1].input: OBSERVATIONS, matching every other single-agent skrl config in IsaacLab. The two multi-agent MAPPO configs that legitimately useSTATES(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.yamlsource/isaaclab_tasks/.../drone_arl/navigation/config/arl_robot_1/agents/skrl_rough_ppo_cfg.yamlsource/isaaclab_tasks/changelog.d/proth-fix-skrl-drone-arl-states-input.rst(patch fragment)Test plan
<string>line 48 →container.py:253→lazy.py:263→linear.py:323) withinput: STATESusing a standalone skrlshared_modelinstantiation against a single-agent obs/action space.init_state_dict(role='policy')andinit_state_dict(role='value')on aSharedModel../isaaclab.sh -f(pre-commit) passes locally.train.py/play.pysmoke test against:Isaac-TrackPositionNoObstacles-ARL-Robot-1-v0Isaac-TrackPositionNoObstacles-ARL-Robot-1-Play-v0 --use_pretrained_checkpointIsaac-Navigation-3DObstacles-ARL-Robot-1-v0