Describe the bug
DomeLight.__init__ uses the class-level default_spawner_cfg object as its spawner_cfg default argument:
# isaaclab_arena/assets/object_library.py:458,468
default_spawner_cfg = sim_utils.DomeLightCfg(color=(0.75, 0.75, 0.75), intensity=500.0)
def __init__(
self,
...
spawner_cfg: sim_utils.DomeLightCfg = default_spawner_cfg,
Object.__init__ then stores it by reference without copying (isaaclab_arena/assets/object.py:55, self.spawner_cfg = spawner_cfg). Since set_intensity, set_color, set_color_temperature and add_hdr mutate self.spawner_cfg in place (object_library.py:415, 422, 433-434, and in add_hdr), every DomeLight constructed without an explicit spawner_cfg shares one config object.
Consequences within a single process:
- Adjusting the light in one environment silently changes it in every other environment that used the default.
- The mutation persists into the class attribute, so lights constructed later start from the mutated value rather than the documented default of 500.
LightIntensityVariation / LightColorVariation / HDRImageVariation operate through these same setters, so variation sweeps leak across environments too.
This is silent — nothing raises, the light is simply the wrong brightness or colour. It matters most for multi-environment processes such as test_all_environments.py and experiment_runner, and for any workflow that tunes lighting per environment.
The same pattern is worth checking on the sibling light classes (DirectionalLight and others deriving from LightBase), which follow the same default_spawner_cfg idiom.
Steps to reproduce
from isaacsim import SimulationApp
app = SimulationApp({"headless": True})
from isaaclab_arena.assets.object_library import DomeLight
a = DomeLight()
b = DomeLight()
print("same cfg object:", a.spawner_cfg is b.spawner_cfg)
print("same as class default:", a.spawner_cfg is DomeLight.default_spawner_cfg)
a.set_intensity(385.0)
print("a.intensity =", a.spawner_cfg.intensity)
print("b.intensity =", b.spawner_cfg.intensity)
print("DomeLight.default_spawner_cfg.intensity =", DomeLight.default_spawner_cfg.intensity)
print("freshly constructed c.intensity =", DomeLight().spawner_cfg.intensity)
app.close()
Output:
same cfg object: True
same as class default: True
a.intensity = 385.0
b.intensity = 385.0
DomeLight.default_spawner_cfg.intensity = 385.0
freshly constructed c.intensity = 385.0
Expected: b and the class default stay at 500.0, and only a becomes 385.0.
System Info
- Arena Release:
main at 094a69b (v0.2.x)
- Isaac Sim 6.0 / Isaac Lab 3.0 Beta, container image
isaaclab_arena:latest
Additional context
The straightforward fix is to default spawner_cfg to None and copy when falling back:
spawner_cfg: sim_utils.DomeLightCfg | None = None,
...
super().__init__(..., spawner_cfg=spawner_cfg if spawner_cfg is not None else self.default_spawner_cfg.copy())
Copying a caller-supplied cfg as well would also stop two assets constructed from one shared cfg object from aliasing, though that is a broader change to Object.
Checklist
Acceptance Criteria
Describe the bug
DomeLight.__init__uses the class-leveldefault_spawner_cfgobject as itsspawner_cfgdefault argument:Object.__init__then stores it by reference without copying (isaaclab_arena/assets/object.py:55,self.spawner_cfg = spawner_cfg). Sinceset_intensity,set_color,set_color_temperatureandadd_hdrmutateself.spawner_cfgin place (object_library.py:415,422,433-434, and inadd_hdr), everyDomeLightconstructed without an explicitspawner_cfgshares one config object.Consequences within a single process:
LightIntensityVariation/LightColorVariation/HDRImageVariationoperate through these same setters, so variation sweeps leak across environments too.This is silent — nothing raises, the light is simply the wrong brightness or colour. It matters most for multi-environment processes such as
test_all_environments.pyandexperiment_runner, and for any workflow that tunes lighting per environment.The same pattern is worth checking on the sibling light classes (
DirectionalLightand others deriving fromLightBase), which follow the samedefault_spawner_cfgidiom.Steps to reproduce
Output:
Expected:
band the class default stay at 500.0, and onlyabecomes 385.0.System Info
mainat 094a69b (v0.2.x)isaaclab_arena:latestAdditional context
The straightforward fix is to default
spawner_cfgtoNoneand copy when falling back:Copying a caller-supplied cfg as well would also stop two assets constructed from one shared cfg object from aliasing, though that is a broader change to
Object.Checklist
Acceptance Criteria
DomeLightinstances constructed without an explicitspawner_cfgdo not share a config object, and mutating one does not affect the other or the class attribute.LightBasesubclasses using thedefault_spawner_cfgidiom.