Simplify default scene lighting#415
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies EmbodiChain’s default simulation lighting by relying solely on lower-intensity environment emission light (removing the default directional “sun” light), and updates the modular Gym tutorial to run predictably with finite episodes and reduced material randomization frequency.
Changes:
- Reduced default global lighting to environment emission only (no default directional light).
- Updated the modular Gym tutorial to remove point-light configuration/randomization and randomize table materials less frequently.
- Made the tutorial exit after 5 episodes instead of running indefinitely.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/tutorials/gym/modular_env.py | Removes point-light setup/randomization, reduces table material randomization frequency, and makes the tutorial loop finite. |
| embodichain/lab/sim/sim_manager.py | Simplifies default global lighting by removing the directional light and lowering emission intensity. |
Comments suppressed due to low confidence (1)
scripts/tutorials/gym/modular_env.py:209
- The inner loop reuses the same loop variable name as the outer episode loop (
i), shadowing it and making it easy to misread/debug the tutorial output. Use distinct names (e.g.,episode_idx/step_idx) or_if unused.
for i in range(5):
obs, info = env.reset()
for i in range(100):
action = torch.zeros(env.action_space.shape, dtype=torch.float32)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
727
to
+731
| directional light is a global scene light (infinite distance) | ||
| pointing downward along the -Z axis. | ||
| """ | ||
| # Environment emission light | ||
| self.set_emission_light([1.0, 1.0, 1.0], 120.0) | ||
|
|
||
| # Directional light as global scene light | ||
| dir_light_cfg = LightCfg( | ||
| uid="default_global_light", | ||
| light_type="sun", | ||
| intensity=8.0, | ||
| direction=(0.0, 0.0, -1.0), | ||
| color=(1.0, 0.95, 0.85), | ||
| enable_shadow=True, | ||
| ) | ||
| self.add_light(dir_light_cfg) | ||
| self.set_emission_light([1.0, 1.0, 1.0], 100.0) |
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
This PR simplifies default simulation lighting and updates the modular Gym tutorial for more predictable, finite runs.
The default scene now uses a lower-intensity environment emission light without an additional directional light. The tutorial no longer configures or randomizes a point light, randomizes table materials less frequently, and exits after five episodes.
Dependencies: None.
Type of change
Screenshots
Not applicable.
Checklist
black .command to format the code base.