Repository navigation
Description
Describe the bug
DirectMARLEnvCfg.state_space = 0 is documented to disable centralized state and make env.state_space equal to None. Instead, DirectMARLEnv._configure_env_spaces() assigns None and then immediately overwrites it with gym.spaces.Box(shape=(0,)) because the negative-state check is a second if with an else, rather than an elif.
This makes the public interface inconsistent: env.state() returns None for the zero configuration, but env.state_space advertises a non-None empty Box. Wrappers or RL libraries that use the space to detect centralized state can configure a zero-width critic input even though no state value is produced.
Steps to reproduce
- Check out
a8b4da3c29ae528b39d4b3c9444d782ce58d886d. - Run
poc/repro.pywith the IsaacLab source packages onPYTHONPATH. - Observe the mismatch:
cfg.state_space: 0
env.state_space: Box([], [], (0,), float32)
env.state(): None
Expected behavior: env.state_space is None, matching the configuration documentation and env.state().
Reproduction files:
direct-marl-zero-state-space-poc.zip
System Info
- Commit:
a8b4da3c29ae528b39d4b3c9444d782ce58d886d(develop); same control flow atb0542fe2d45bf91c4e1d9ef6952b9c709c80b4e8(main) - Isaac Sim Version: not required by the kitless unit reproduction; current project dependency is 6.1.0
- OS: Ubuntu 24.04.5 LTS
- GPU: NVIDIA GeForce RTX 5060 Ti (not used)
- CUDA / driver: driver 595.84; CPU unit test
Additional context
The contradictory branches are in _configure_env_spaces. The zero contract is documented in DirectMARLEnvCfg.state_space and implemented by DirectMARLEnv.state().
The proposed fix changes the negative-state branch to elif and adds a kitless regression using the existing stub. Discussion #1264 recommends state_space=0, but does not identify this multi-agent control-flow bug.
Checklist
- I have checked that there is no similar issue in the repo (bounded issue and PR search repeated on 2026-09-12; repeat immediately before filing)
- I have checked that the issue is not in running Isaac Sim itself and is related to the repo
Acceptance Criteria
-
DirectMARLEnvCfg.state_space = 0producesenv.state_space is None. - Negative configuration still constructs the flattened joint-observation state space.
- Positive and explicit Gymnasium state spaces retain their existing behavior.
-
env.state_spaceandenv.state()agree on whether centralized state exists.
Activity
AntoineRichard commentedon Sep 15, 2026
Hi @peachtree0222! Thanks for opening this issue an the associated PR! We're looking into it.
Keep disabled Direct MARL state spaces as None (#7810)
StafaH commentedon Sep 20, 2026
Resolved by #7810.
Keep disabled Direct MARL state spaces as None (isaac-sim#7810)