Skip to content

[Feature] Isaac Lab 3.x compatibility for wrapper - #4194

Open
theap06 wants to merge 1 commit into
pytorch:mainfrom
theap06:isaaclab-v3-compat
Open

[Feature] Isaac Lab 3.x compatibility for wrapper#4194
theap06 wants to merge 1 commit into
pytorch:mainfrom
theap06:isaaclab-v3-compat

Conversation

@theap06

@theap06 theap06 commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Description

Isaac Lab 3.0 (beta2) introduces a factory-based multi-backend architecture. Testing IsaacLabWrapper against it end-to-end (kit-less install, ovphysx backend, A10) showed the wrapper's step/reset machinery works unmodified in all supported configurations, with two concrete defects fixed here:

  1. Reward buffer aliasing. Isaac Lab 3.x mutates the manager-based reward buffer in place between steps (verified by holding references across 20 steps; terminated/truncated are no longer mutated, but reward now is). The wrapper cloned terminated/truncated but passed reward through as a view of the mutated buffer. It now clones the reward as well.
  2. v3 ProxyArray in the tiled-camera path. .data.* buffers are warp-backed ProxyArray objects in 3.x (with a torch view accessor), so torch.as_tensor on camera.data.output[...] no longer yields a usable tensor, and dtype probing returned warp dtypes. A new _isaac_data_to_torch helper accepts v2 torch.Tensor buffers, v3 proxies, and plain warp arrays (via DLPack).

Also adds a docstring note for the 3.x launch API (launch_simulation/Hydra presets replacing AppLauncher).

Results with a basic warp run
'''
env=IsaacLabWrapper(env=<OrderEnforcing<CartpoleWarpEnv>>, batch_size=torch.Size([8]))
batch_size: torch.Size([8]) device: cuda:0
rollout shape: torch.Size([8, 50])
reward sum: 94.55167388916016
done fraction: 0.03999999910593033
episode_reward: tensor([ 2.7660, 3.7561, 15.9770, 1.4488, 4.8248, 11.1499, 3.3809, 0.6895])
'''

@pytorch-bot

pytorch-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/4194

Note: Links to docs will display an error until the docs builds have been completed.

⚠️ 16 Awaiting Approval

As of commit 1198d88 with merge base ae9719f (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 1, 2026
@github-actions github-actions Bot added BugFix Environments Adds or modifies an environment wrapper Environments/isaaclab and removed BugFix labels Sep 1, 2026
@theap06 theap06 changed the title [BugFix] Isaac Lab 3.x compatibility fixes for IsaacLabWrapper [Feature] Isaac Lab 3.x compatibility fixes for IsaacLabWrapper Sep 1, 2026
@theap06 theap06 changed the title [Feature] Isaac Lab 3.x compatibility fixes for IsaacLabWrapper [Feature] Isaac Lab 3.x compatibility for wrapper Sep 1, 2026
@github-actions github-actions Bot added the Feature New feature label Sep 1, 2026
@theap06

theap06 commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

@torchrlbot reviewer @vmoens

@github-actions
github-actions Bot requested a review from vmoens September 1, 2026 09:04
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Requested review from @vmoens (requested by @theap06).

Isaac Lab 3.0 mutates the reward buffer in place between steps, so the
wrapper now clones the reward alongside terminated and truncated.
The tiled-camera path converts pixels through _isaac_data_to_torch,
which accepts the v3 warp-backed ProxyArray as well as v2 torch
buffers. The per-index reset bridge detects the experimental Warp
direct envs (DirectRLEnvWarp), whose _reset_idx takes a boolean mask
instead of indices, and converts accordingly.

Verified against Isaac Lab 3.0.0-beta2 (kit-less, ovphysx/newton
backends, A10): wrap suites pass 8/8 with native_autoreset on
Isaac-Cartpole-Direct-v0, Isaac-Velocity-Flat-Anymal-D-v0 and
Isaac-Cartpole-Direct-Warp-v0.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018hdDvm4HFQe8e7AuG8d72b
@theap06

theap06 commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator Author

@vmoens will also create an updated isaac lab wrapper for torchRL for their interface. this pr can be merged before the official v3 release as the proxyarray helper works on the v2 tensors already. we also have the mask branch only activates when isaaclab_experimental is installed and the env is a DirectRLEnvWarp. So we are good to merge this beforehand

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BugFix CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Environments/isaaclab Environments Adds or modifies an environment wrapper Feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant