Add support for indirect light setting for env#161
Merged
Conversation
Contributor
There was a problem hiding this comment.
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_lightvisual randomization functor that applies global emission light color/intensity viaenv.sim.set_emission_light. - Extend env lighting config to accept an
indirectsection and applyemission_lightduring 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add
randomize_emission_lightfunctor 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. Unlikerandomize_lightwhich 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
Screenshots
N/A
Checklist
black .command to format the code base.