Skip to content

Simplify default scene lighting#415

Merged
yuecideng merged 1 commit into
mainfrom
enhance/default-lighting-tutorial
Jul 20, 2026
Merged

Simplify default scene lighting#415
yuecideng merged 1 commit into
mainfrom
enhance/default-lighting-tutorial

Conversation

@yuecideng

Copy link
Copy Markdown
Contributor

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

  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (non-breaking change which improves an existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (existing functionality will not work without user modification)
  • Documentation update

Screenshots

Not applicable.

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 July 20, 2026 06:14
@yuecideng yuecideng added enhancement New feature or request rendering Things related to rendering (eg, performace, efficiency, bug) gym robot learning env and its related features labels Jul 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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)
@yuecideng
yuecideng merged commit ec9b2cb into main Jul 20, 2026
5 checks passed
@yuecideng
yuecideng deleted the enhance/default-lighting-tutorial branch July 20, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request gym robot learning env and its related features rendering Things related to rendering (eg, performace, efficiency, bug)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants