Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates EmbodiChain’s simulation/rendering integration to align with DexSim v0.4.0 by replacing the previous enable_rt-style flags with a structured rendering configuration (RenderCfg) and propagating that change through tests, examples, CLI helpers, configs, and docs.
Changes:
- Introduce
RenderCfgand migrateSimulationManagerCfgrendering settings torender_cfg. - Update scripts/examples/tests to use
--rendererand/orRenderCfg(renderer=...)instead of--enable_rt. - Apply broad formatting/whitespace cleanup across multiple modules and docs.
Reviewed changes
Copilot reviewed 80 out of 80 changed files in this pull request and generated 33 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/sim/sensors/test_stereo.py | Migrate stereo camera tests to RenderCfg/renderer-based configuration |
| tests/sim/sensors/test_contact.py | Migrate contact sensor tests to RenderCfg/renderer-based configuration |
| tests/sim/sensors/test_camera.py | Migrate camera tests to RenderCfg/renderer-based configuration |
| tests/sim/objects/test_usd.py | Update USD object tests to use render_cfg |
| tests/sim/objects/test_soft_object.py | Update soft object tests to use render_cfg |
| tests/sim/objects/test_robot.py | Whitespace cleanup |
| tests/gym/envs/test_embodied_env.py | Update env tests to use render_cfg and renderer arg |
| tests/gym/envs/managers/test_dataset_functors.py | Whitespace cleanup |
| tests/common.py | Whitespace cleanup |
| tests/agents/test_shared_rollout.py | Update sim config to use render_cfg |
| scripts/tutorials/sim/import_usd.py | Update tutorial script to new env launcher args + RenderCfg |
| scripts/tutorials/sim/gizmo_robot.py | Update tutorial script to new env launcher args + RenderCfg |
| scripts/tutorials/sim/export_usd.py | Update tutorial script to new env launcher args + RenderCfg |
| scripts/tutorials/sim/create_softbody.py | Update tutorial script to new env launcher args + RenderCfg |
| scripts/tutorials/sim/create_sensor.py | Update tutorial script to new env launcher args + RenderCfg |
| scripts/tutorials/sim/create_scene.py | Update tutorial script to new env launcher args + RenderCfg |
| scripts/tutorials/sim/create_robot.py | Update tutorial script to new env launcher args + RenderCfg |
| scripts/tutorials/sim/create_rigid_object_group.py | Update tutorial script to new env launcher args + RenderCfg |
| scripts/tutorials/gym/random_reach.py | Replace ad-hoc CLI args with shared env launcher args |
| scripts/tutorials/gym/modular_env.py | Update modular env example to pass renderer/device/headless/num_envs |
| examples/sim/utility/workspace_analyzer/analyze_plane_workspace.py | Whitespace cleanup |
| examples/sim/sensors/create_contact_sensor.py | Update example to use env launcher args + RenderCfg |
| examples/sim/sensors/batch_camera.py | Update example to use env launcher args + RenderCfg |
| examples/sim/scene/scene_demo.py | Update scene demo CLI and rendering config to renderer-based setup |
| examples/sim/gizmo/gizmo_w1.py | Update gizmo example CLI and rendering config |
| examples/sim/gizmo/gizmo_scene.py | Update gizmo example CLI and rendering config |
| examples/sim/gizmo/gizmo_robot.py | Update gizmo example CLI and rendering config |
| examples/sim/gizmo/gizmo_object.py | Update gizmo example CLI and rendering config |
| examples/sim/gizmo/gizmo_camera.py | Update gizmo example CLI and rendering config |
| examples/sim/demo/scoop_ice.py | Update demo to use env launcher args + renderer configuration |
| examples/sim/demo/press_softbody.py | Update demo to use env launcher args + renderer configuration |
| examples/sim/demo/grasp_cup_to_caffe.py | Update demo to use env launcher args + renderer configuration |
| examples/agents/datasets/online_dataset_demo.py | Adjust demo engine config keys for renderer-based setup |
| embodichain/utils/warp/kinematics/opw_solver.py | Whitespace cleanup |
| embodichain/utils/configclass.py | Whitespace cleanup |
| embodichain/utils/init.py | Whitespace cleanup |
| embodichain/toolkits/urdf_assembly/component.py | Whitespace cleanup |
| embodichain/lab/sim/utility/workspace_analyzer/visualizers/voxel_visualizer.py | Whitespace cleanup |
| embodichain/lab/sim/utility/workspace_analyzer/visualizers/sphere_visualizer.py | Whitespace cleanup |
| embodichain/lab/sim/utility/workspace_analyzer/visualizers/base_visualizer.py | Whitespace cleanup |
| embodichain/lab/sim/utility/workspace_analyzer/samplers/base_sampler.py | Whitespace cleanup |
| embodichain/lab/sim/utility/workspace_analyzer/constraints/workspace_constraint.py | Whitespace cleanup |
| embodichain/lab/sim/utility/workspace_analyzer/constraints/base_constraint.py | Whitespace cleanup |
| embodichain/lab/sim/utility/workspace_analyzer/configs/init.py | Whitespace cleanup |
| embodichain/lab/sim/utility/workspace_analyzer/caches/cache_manager.py | Whitespace cleanup |
| embodichain/lab/sim/utility/workspace_analyzer/caches/base_cache.py | Whitespace cleanup |
| embodichain/lab/sim/types.py | Whitespace cleanup |
| embodichain/lab/sim/solvers/pinocchio_solver.py | Whitespace cleanup |
| embodichain/lab/sim/solvers/opw_solver.py | Whitespace cleanup |
| embodichain/lab/sim/solvers/differential_solver.py | Whitespace cleanup |
| embodichain/lab/sim/sim_manager.py | Replace old RT flags with render_cfg, update renderer wiring and behavior |
| embodichain/lab/sim/robots/dexforce_w1/utils.py | Whitespace cleanup |
| embodichain/lab/sim/objects/gizmo.py | Whitespace cleanup |
| embodichain/lab/sim/cfg.py | Add RenderCfg configclass and DexSim renderer flag mapping |
| embodichain/lab/sim/atom_actions.py | Whitespace cleanup |
| embodichain/lab/scripts/run_agent.py | Whitespace cleanup |
| embodichain/lab/gym/utils/gym_utils.py | Update shared CLI args + config merging to use renderer/RenderCfg |
| embodichain/lab/gym/envs/tasks/tableware/pour_water/action_bank.py | Whitespace cleanup |
| embodichain/lab/gym/envs/managers/randomization/spatial.py | Whitespace cleanup |
| embodichain/lab/gym/envs/managers/randomization/physics.py | Whitespace cleanup |
| embodichain/lab/gym/envs/embodied_env.py | Whitespace cleanup |
| embodichain/lab/gym/envs/action_bank/utils.py | Whitespace cleanup |
| embodichain/data/assets/scene_assets.py | Whitespace cleanup |
| embodichain/data/assets/robot_assets.py | Whitespace cleanup |
| embodichain/data/assets/obj_assets.py | Whitespace cleanup |
| embodichain/data/assets/materials.py | Whitespace cleanup |
| embodichain/data/assets/eef_assets.py | Whitespace cleanup |
| embodichain/agents/rl/train.py | Switch trainer config handling from enable_rt to renderer/RenderCfg |
| embodichain/agents/rl/models/mlp.py | Whitespace cleanup |
| embodichain/agents/engine/data.py | Switch engine sim config from enable_rt to renderer/RenderCfg |
| embodichain/agents/datasets/sampler.py | Whitespace cleanup |
| embodichain/agents/datasets/online_data.py | Whitespace cleanup |
| docs/sync_readme.py | Formatting tweak |
| docs/source/tutorial/sensor.rst | Update tutorial CLI docs from --enable_rt to --renderer |
| docs/source/tutorial/robot.rst | Update tutorial CLI docs from --enable_rt to --renderer |
| docs/source/tutorial/gizmo.rst | Update tutorial CLI docs from --enable_rt to --renderer |
| docs/source/overview/sim/sim_manager.md | Update sim manager docs to reflect renderer configuration changes |
| configs/agents/rl/push_cube/train_config.json | Replace enable_rt with renderer and reformat JSON |
| configs/agents/rl/basic/cart_pole/train_config_grpo.json | Replace enable_rt with renderer and reformat JSON |
| configs/agents/rl/basic/cart_pole/train_config.json | Replace enable_rt with renderer and reformat JSON |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+170
to
+172
| self.setup_simulation( | ||
| "cpu", render_cfg=RenderCfg(renderer="fast-rt" if False else "legacy") | ||
| ) |
Comment on lines
+154
to
+156
| self.setup_simulation( | ||
| "cuda", render_cfg=RenderCfg(renderer="fast-rt" if False else "legacy") | ||
| ) |
Comment on lines
152
to
+156
| class TestCameraRaster(CameraTest): | ||
| def setup_method(self): | ||
| self.setup_simulation("cuda", enable_rt=False) | ||
| self.setup_simulation( | ||
| "cuda", render_cfg=RenderCfg(renderer="fast-rt" if False else "legacy") | ||
| ) |
| else: | ||
| logger.log_error( | ||
| f"Invalid renderer type '{self.renderer}' specified. Must be one of 'legacy', 'hybrid', or 'fast-rt'." | ||
| ) |
Comment on lines
+150
to
+152
| self.setup_simulation( | ||
| "cpu", render_cfg=RenderCfg(renderer="fast-rt" if False else "legacy") | ||
| ) |
Comment on lines
174
to
+177
| test = CameraTest() | ||
| test.setup_simulation("cpu", enable_rt=False) | ||
| test.setup_simulation( | ||
| "cpu", render_cfg=RenderCfg(renderer="fast-rt" if False else "legacy") | ||
| ) |
Comment on lines
+222
to
+224
| self.setup_simulation( | ||
| "cpu", render_cfg=RenderCfg(renderer="fast-rt" if False else "legacy") | ||
| ) |
Comment on lines
+168
to
+170
| self.setup_simulation( | ||
| "cuda", render_cfg=RenderCfg(renderer="fast-rt" if True else "legacy") | ||
| ) |
Comment on lines
78
to
80
| gym_config["headless"] = True | ||
| gym_config["enable_rt"] = True | ||
| gym_config.get("renderer", "legacy") = True | ||
| gym_config["gpu_id"] = 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
Type of change
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist
black .command to format the code base.