Skip to content

Add support for indirect light setting for env#161

Merged
yuecideng merged 5 commits intomainfrom
yueci/indirect-light
Mar 5, 2026
Merged

Add support for indirect light setting for env#161
yuecideng merged 5 commits intomainfrom
yueci/indirect-light

Conversation

@yuecideng
Copy link
Contributor

@yuecideng yuecideng commented Mar 5, 2026

Description

Add randomize_emission_light functor to support domain randomization of global emission light properties. This is a common technique for improving sim-to-real transfer in vision-based tasks.

The new functor samples emission light color (RGB) and intensity uniformly from configurable ranges and applies them globally via env.sim.set_emission_light. Unlike randomize_light which targets specific scene light objects, this controls the scene-wide emissive lighting.

Corresponding documentation has been added to the Visual Randomization functor table in docs/source/overview/gym/event_functors.md.

Fixes # (issue)

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation update

Screenshots

N/A

Checklist

  • I have run the black . command to format the code base.
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Dependencies have been updated, if applicable.

Copilot AI review requested due to automatic review settings March 5, 2026 04:44
@yuecideng yuecideng added the gym robot learning env and its related features label Mar 5, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for configuring and domain-randomizing global emissive (“environment emission”) lighting, complementing the existing per-light-object randomize_light functor.

Changes:

  • Add randomize_emission_light visual randomization functor that applies global emission light color/intensity via env.sim.set_emission_light.
  • Extend env lighting config to accept an indirect section and apply emission_light during environment light setup.
  • Document the new functor in the event functors table.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
embodichain/lab/gym/utils/gym_utils.py Parses light.indirect from config into EmbodiedEnvCfg.
embodichain/lab/gym/envs/managers/randomization/visual.py Adds randomize_emission_light functor and exports it.
embodichain/lab/gym/envs/embodied_env.py Adds EnvLightCfg.indirect and applies emission_light in _setup_lights().
docs/source/overview/gym/event_functors.md Documents randomize_emission_light in Visual Randomization table.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@yuecideng yuecideng merged commit fa29843 into main Mar 5, 2026
5 checks passed
@yuecideng yuecideng deleted the yueci/indirect-light branch March 5, 2026 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gym robot learning env and its related features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants