-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Add Option for Warp Renderer backend with PhysX simulation engine #4612
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
bdilinila
wants to merge
79
commits into
isaac-sim:develop
Choose a base branch
from
bdilinila:dev/bdilinila/physx-warp
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+303
−37
Draft
Changes from all commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
ae4faca
save
ooctipus 20d405a
add hydra group override feature
ooctipus 53a5cfa
fix lambda in loop issue
ooctipus deb1434
add vision env
ooctipus eba3ec6
Add vision-based dexterous manipulation support with RTX rendering
bdilinila 1165623
Add Newton Warp renderer infrastructure
bdilinila 6403cf2
Implement Newton Manager for PhysX-to-Newton state synchronization
bdilinila cdbb37a
Complete USDRT transform extraction for PhysX→Newton sync
bdilinila 74a0936
Add renderer_type configuration to vision tasks
bdilinila 38199b3
Newton Warp renderer integration complete and working!
bdilinila 87e5e4f
Add detiling kernels for Newton Warp multi-env (WIP)
bdilinila 1640051
Complete Newton Warp integration with multi-env support!
bdilinila fc95edf
Add Newton Warp rendering documentation and visualization tools
bdilinila 914dc6f
Add automatic image saving to Newton Warp renderer
bdilinila 6693442
Add vision-based dexterous manipulation support with RTX rendering
bdilinila cc26b34
Add Newton Warp renderer infrastructure
bdilinila 759133d
Implement Newton Manager for PhysX-to-Newton state synchronization
bdilinila 5644169
Complete USDRT transform extraction for PhysX to Newton sync
bdilinila a63ff3d
Add renderer_type configuration to vision tasks
bdilinila c3ccc0a
Newton Warp renderer integration complete and working
bdilinila d15dedc
Add detiling kernels for Newton Warp multi-env (WIP)
bdilinila 8e2d1e0
Complete Newton Warp integration with multi-env support
bdilinila 9e10b4f
Use PhysX->Newton GPU sync before Newton Warp render; set_scene in en…
bdilinila cb03630
debugging; fix of save_images conflict
bdilinila 2fcb34d
Fix Timer
bdilinila e0b8470
Add --renderer_backend to train.py
bdilinila 8c6ded0
Add --renderer_backend to train.py; restore hydra doc
bdilinila ebb215b
Revert change to threshold from merge conflict
bdilinila 75f47fe
Added timers for sim-render engine comparisons; fix for PhysX->Warp r…
bdilinila 837c272
Timer updates with prep+kernel+copy
bdilinila 0b590d3
guidelines format; moved newton_manager.py
bdilinila bc0b9bb
Removed files used for local testing
bdilinila f2a4426
Move newton_manager.py back to _impl per newton/dexsuite_warp_rendering
bdilinila b88736c
docstrings; update docs for backend
bdilinila 6db601f
--format
bdilinila cb8bd63
Added name to CONTRIBUTORS.md
bdilinila e5006e8
Use newton from Github vice local clone
bdilinila 5592d9b
Added docs for setting up and running train.py with PhysX sim engine …
bdilinila 24b300d
Removed temporary code to save images for testing
bdilinila bae4796
Apply ImportError suggestion from @greptile-apps[bot]
bdilinila f1054c7
flatdict greptile suggestion
bdilinila 99dd593
Missing classes in kula_allegro
bdilinila a9f286a
renderer_backend logs and tess
bdilinila 1604230
use variants vice renderer_backend; parse variants instead of using h…
bdilinila a2f47d6
tiled renamed to rtx; warp_renderer instead of newton_warp
bdilinila 3964da9
Separate renderer type from env.scene
bdilinila 73c960f
Swap for new Warp renderer from PR 4608
bdilinila 69d79e1
Incorporate passing of renderer config classes to tiled camera from P…
bdilinila 16f6a6f
Add missing isaac rtx renderer cfg file
bdilinila c72951e
rebase conflict fixes; 4D/3D Newton fallback
bdilinila 88004ce
Move renderer selection to camera instead of task
bdilinila 07d6121
Removed choosing renderer in tasks; reduce diffs
bdilinila 430f6a4
Fix for TiledCameraCfg "MISSING" data_types
bdilinila 51bbfaa
Fix TiledCamera RTX path for renderer_type=rtx
bdilinila 1d37ca7
"make newton optional at runtime; align error messages with isaaclab_…
bdilinila 1bf6370
Consolidate renderer types to isaac_rtx/newton_warp; remove dead code
bdilinila 2bbc02c
cleanup of diffs; body_label/body_key for fixed newton
bdilinila e040e77
revert hydra.rst docs on renderer type
bdilinila e62e6dc
further cleaning up of diffs - removing unused Timer and saving image…
bdilinila 5081609
PR cleanup: renderer factory, reverted lazy imports in visualizers, n…
bdilinila c3ec2b0
Revert tiled_camera and newton_warp_renderer to develop versions
bdilinila cdfa97c
Updates to simulation_context, manager-based envs, and train script
bdilinila 09026e1
Cleanup: RendererCfg base, tiled_camera unused code, kuka_allegro and…
bdilinila bc951c4
Remove duplicate block in scene_data_providers __init__; tiled_camera…
bdilinila 9fb5219
Docs: add Newton/Warp conflict and fix to physx_warp_training.rst
bdilinila 297bfa0
Remove duplicate file; update unit test
bdilinila 563f5d4
Hydra renderer config - groups, renderer inst, docs, tests
bdilinila da3e106
Cleanup: remove dead renderer/camera code, trim configs; dexsuite obs…
bdilinila 70c25b6
docs: remove NEWTON_WARP_4D_SETUP refs, drop local Newton install option
bdilinila 0740d6e
doc and minor cleanup
bdilinila 9c5070e
Dexsuite/reach config, hydra strict handling, dict/configclass updates
bdilinila 8e7738b
Hydra render_cfg group: presets + apply to all cameras
bdilinila 5da345c
Rename render_cfg group to renderer
bdilinila 58b7bdc
Decouple renderer data_types from presets, Cartpole entry point, upda…
bdilinila 7539545
Renderer config store; drop instantiate_renderer_cfg, strict=, env.sc…
bdilinila 8e9ca13
Hydra: set defaults before store; drop logging, variant helpers; conf…
bdilinila c26ef61
tiled_camera: add missing warp import; renderer_cfg: drop __future__ …
bdilinila a1116b8
render group, process_hydra_config, optional Newton
bdilinila 360faa3
Revert renderers, tiled_camera, configclass, dict to main develop; re…
bdilinila File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,155 @@ | ||
| .. _physx-warp-training: | ||
|
|
||
| PhysX + Warp Training (Isaac Sim 6.0) | ||
| ===================================== | ||
|
|
||
| This document gives step-by-step instructions to set up the environment and run RL training (e.g., Cartpole RGB Camera, Direct) using PhysX simulation and the Isaac RTX or Newton Warp renderer. | ||
|
|
||
| 1. Isaac Sim (6.0) from source | ||
| ------------------------------ | ||
|
|
||
| #. Clone and build Isaac Sim: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| cd ~/git # or your preferred parent directory | ||
| git clone https://gitlab-master.nvidia.com/omniverse/isaac/omni_isaac_sim.git | ||
| cd omni_isaac_sim | ||
| git checkout b69c05612c11ee0bafe15ea9e8d0189fab3e07f4 | ||
|
|
||
| #. If needed for the build, add Jinja2 to ``deps/pip_cloud.toml`` (e.g. ``"Jinja2==3.1.5"`` in the packages list). | ||
| #. Build: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| ./build.sh -r | ||
|
|
||
| 2. Clone IsaacLab-Physx-Warp and symlink Isaac Sim | ||
| -------------------------------------------------- | ||
|
|
||
| #. Clone the IsaacLab-Physx-Warp repo (if not already), e.g.: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| cd ~/git | ||
| git clone git@github.com:bdilinila/IsaacLab.git IsaacLab-Physx-Warp | ||
| cd IsaacLab-Physx-Warp | ||
|
|
||
| Use the appropriate branch or fork URL for your setup. | ||
|
|
||
| #. Create the ``_isaac_sim`` symlink to the built Sim: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| rm -f _isaac_sim | ||
| ln -sfn /path/to/omni_isaac_sim/_build/linux-x86_64/release _isaac_sim | ||
|
|
||
| Replace ``/path/to/omni_isaac_sim`` with the actual path to your ``omni_isaac_sim`` clone. | ||
|
|
||
| 3. Conda environment | ||
| -------------------- | ||
|
|
||
| #. From the **IsaacLab-Physx-Warp** repo root, create the conda env (Python 3.12): | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| ./isaaclab.sh -c physx_dextrah | ||
|
|
||
| #. Activate it: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| source "$(conda info --base)/etc/profile.d/conda.sh" | ||
| conda activate physx_dextrah | ||
|
|
||
| 4. Install IsaacLab and dependencies | ||
| ----------------------------------- | ||
|
|
||
| #. Install all IsaacLab extensions (this installs the ``isaaclab`` package from ``source/isaaclab`` and other packages under ``source/``): | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| ./isaaclab.sh -i | ||
|
|
||
| If you only need to reinstall the ``isaaclab`` package (e.g. after editing code in ``source/isaaclab``), you can run from the repo root: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| pip install -e source/isaaclab | ||
|
|
||
| #. Remove Newton and Warp from the Isaac Sim build so the app uses the pip-installed Newton (and avoids version conflicts). In the ``omni_isaac_sim`` build tree, rename or remove the prebundle folders so they are not loaded, e.g.: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| cd /path/to/omni_isaac_sim/_build/linux-x86_64/release | ||
| mv pip_prebundle/newton pip_prebundle/newton_bak # or remove | ||
| mv pip_prebundle/warp pip_prebundle/warp_bak # if needed | ||
|
|
||
| Replace ``/path/to/omni_isaac_sim`` with your clone path. | ||
|
|
||
| #. Install Newton via pip (required for the Newton Warp renderer). Either from the Git commit in ``source/isaaclab/setup.py``: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| pip install "newton @ git+https://github.com/newton-physics/newton.git@35657fc" | ||
|
|
||
| 5. Verify installation | ||
| ---------------------- | ||
|
|
||
| From the IsaacLab-Physx-Warp root with the conda env activated: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| python -c "import newton; import warp; print('Newton, Warp OK')" | ||
| python -c "import isaacsim; print('Isaac Sim:', isaacsim.__file__)" | ||
| python -c "from isaaclab.app import AppLauncher; print('IsaacLab OK')" | ||
|
|
||
| Possible Newton / Warp conflict | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Isaac Sim's build ships its own Newton and Warp under ``_build/.../pip_prebundle/``. If you skip the steps in section 4 (removing those folders and pip-installing Newton), the app may load the prebundle and you can see version or API conflicts. Follow the steps in section 4 to remove or rename the ``newton`` and ``warp`` folders in the Isaac Sim build and install Newton via pip. | ||
|
|
||
| 6. Run training | ||
| --------------- | ||
|
|
||
| Renderer selection | ||
| ~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Camera renderer is chosen via the Hydra ``render`` config group. Supported values are ``isaac_rtx`` (default) and ``newton_warp``. | ||
| The selected preset is applied to all cameras (see ``isaaclab_tasks.utils.render_config_store`` and ``process_hydra_config`` in ``isaaclab_tasks.utils.hydra``). | ||
|
|
||
| Use the top-level override ``render=isaac_rtx`` or ``render=newton_warp``. If omitted, it defaults to ``isaac_rtx``. | ||
|
|
||
| Example command | ||
| ~~~~~~~~~~~~~~~ | ||
|
|
||
| From the **IsaacLab-Physx-Warp** repo root, with the conda env activated: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| ./isaaclab.sh -p scripts/reinforcement_learning/rl_games/train.py \ | ||
| --task=Isaac-Cartpole-RGB-Camera-Direct-v0 \ | ||
| --enable_cameras \ | ||
| --headless \ | ||
| render=isaac_rtx | ||
|
Comment on lines
+130
to
+134
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inconsistent training script path: line 130 uses |
||
|
|
||
| Use ``render=newton_warp`` to use the Newton Warp renderer instead. For longer training runs, increase ``--num_envs`` and ``--max_iterations`` (e.g. ``--num_envs=2048 --max_iterations=32``); redirect stdout/stderr if desired, e.g. ``2>&1 | tee train.log``. | ||
|
|
||
| Summary | ||
| ------ | ||
|
|
||
| +------+----------------------------------------------------------------------------------------------------------------------------------+ | ||
| | Step | Action | | ||
| +======+==================================================================================================================================+ | ||
| | 1 | Clone and build Isaac Sim 6.0; checkout commit ``b69c05612c11ee0bafe15ea9e8d0189fab3e07f4`` | | ||
| +------+----------------------------------------------------------------------------------------------------------------------------------+ | ||
| | 2 | Clone IsaacLab-Physx-Warp and set ``_isaac_sim`` symlink | | ||
| +------+----------------------------------------------------------------------------------------------------------------------------------+ | ||
| | 3 | ``./isaaclab.sh -c physx_dextrah`` then ``conda activate physx_dextrah`` | | ||
| +------+----------------------------------------------------------------------------------------------------------------------------------+ | ||
| | 4 | ``./isaaclab.sh -i``; remove/rename ``newton`` and ``warp`` in omni_isaac_sim ``pip_prebundle``; ``pip install`` Newton (git or local) | | ||
| +------+----------------------------------------------------------------------------------------------------------------------------------+ | ||
| | 5 | Run the verification commands | | ||
| +------+----------------------------------------------------------------------------------------------------------------------------------+ | ||
| | 6 | Run ``./isaaclab.sh -p scripts/reinforcement_learning/rsl_rl/train.py --task=Isaac-Cartpole-RGB-Camera-Direct-v0 --enable_cameras --headless ... render=isaac_rtx`` as above | | ||
| +------+----------------------------------------------------------------------------------------------------------------------------------+ | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,6 +11,7 @@ | |
| from typing import TYPE_CHECKING, Any | ||
|
|
||
| import torch | ||
| import warp as wp | ||
|
|
||
| from pxr import UsdGeom | ||
|
|
||
|
|
||
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
28 changes: 28 additions & 0 deletions
28
source/isaaclab_tasks/isaaclab_tasks/utils/render_config_store.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| # Copyright (c) 2022-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). | ||
| # All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| """Renderer config presets for Hydra ConfigStore. | ||
|
|
||
| Register renderer backend configs that can be selected via the ``render`` config | ||
| group (e.g. ``render=isaac_rtx`` or ``render=newton_warp``). The selected config | ||
| is applied to all cameras in the scene. | ||
| """ | ||
|
|
||
| from hydra.core.config_store import ConfigStore | ||
|
|
||
| from isaaclab_physx.renderers import IsaacRtxRendererCfg | ||
|
|
||
| try: | ||
| from isaaclab_newton.renderers import NewtonWarpRendererCfg | ||
| except ImportError: | ||
| NewtonWarpRendererCfg = None | ||
|
|
||
|
|
||
| def register_render_configs() -> None: | ||
| """Register renderer config presets in Hydra ConfigStore.""" | ||
| cs = ConfigStore.instance() | ||
| cs.store(name="isaac_rtx", group="render", node=IsaacRtxRendererCfg()) | ||
| if NewtonWarpRendererCfg is not None: | ||
| cs.store(name="newton_warp", group="render", node=NewtonWarpRendererCfg()) |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personal fork reference (
git@github.com:bdilinila/IsaacLab.git). Consider using the main repository URL or making it more generic for usersNote: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!