Skip to content

Render reset camera observations by default - #1797

Merged
qianl-nv merged 6 commits into
mainfrom
qianl-nv/fix/default-reset-camera-render
Dec 2, 2026
Merged

qianl-nv merged 6 commits into
mainfrom
qianl-nv/fix/default-reset-camera-render

Conversation

@qianl-nv

@qianl-nv qianl-nv commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Set num_rerenders_on_reset=1 by default for Newton and PhysX so policies and recorders receive a rendered reset observation. Suppress reset renders once an episode-limited run has assigned all its episodes.

Why this change?

Headless Newton recording can store a black first camera frame after a hard simulation reset. Reset observations can also retain pixels from the previous scene state. See NVBug 7141102.

What changes?

  • Use Lab's existing reset-render pipeline, before recorder hooks and observation consumption. Lab gates rendering on RTX sensors; explicit environment overrides remain available.
  • Avoid extra reset renders during the idle tail of finite evaluations, restoring the configured setting even if stepping fails.
  • Test camera positions across two episodes: construction at image center, first reset at bottom left, second reset at top right. Each episode's end frame must match its reset position. Run camera collection in the test call phase so failures work with the existing pytest shutdown hook.

Validation

Newton deformable recording

Earlier headless DROID HDF5 captures on Lab e3f7d9ff, changing only the reset-render setting. Episode 1, external camera, frame 0:

Before: num_rerenders_on_reset=0 After: num_rerenders_on_reset=1
Black first frame Rendered first frame
Mean RGB 0.000 Mean RGB 218.260

Across three episodes and three cameras, black first images dropped from 9/9 to 0/9. Recording and policy-observation comparisons.

Remaining PhysX pose issue

Fresh diagnostic captures with the updated positions, one reset render, headless Isaac RTX, and pinned Lab e3f7d9ff. Entries show episode 1 / episode 2 frame 0:

Backend/object Ordinary reset Hard simulation reset
Newton rigid Pass / Pass Pass / Pass
Newton deformable Pass / Pass Pass / Pass
PhysX rigid Fail / Pass Fail / Fail
PhysX deformable Fail / Fail Fail / Fail

All frame-1 and episode-end images show the correct position. PhysX physics positions are correct before rendering catches up; the remaining geometry/transform publication issue requires a Lab fix (NVBug 7183639). Affected ordinary-reset checks are skipped with a TODO; redundant PhysX hard-reset builds are omitted from the normal suite.

Run the camera tests:

env OMNI_KIT_ACCEPT_EULA=YES ACCEPT_EULA=Y \
  PYTHONPATH="$PWD:$PWD/isaaclab_arena_embodiments:$PWD/isaaclab_arena_policies" \
  .venv/bin/python -m pytest -sv isaaclab_arena/tests/test_camera_reset_object_pose.py

Test results before

Red: rendered pose; blue: expected pose based on reset
image
image

Test results after

image image

Reset-render cost

At 96 environments, measured additional render latency was 122.5 ms for one environment resetting and 152.4 ms total for all 96 resetting together, excluding policy inference and placement-pool refills. For 960 episodes / 864 replacement resets, the estimated added latency is 1.37 s best case (nine synchronized batches) to 105.8 s worst case (864 separate reset steps), excluding the initial reset.

@qianl-nv
qianl-nv marked this pull request as ready for review December 1, 2026 16:45
@greptile-apps

greptile-apps Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; no actionable issues were found.RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

Sets num_rerenders_on_reset to 1 in Arena’s shared environment configuration.

  • Reset camera observations now get a fresh render before they are read.

No actionable issues were found. Tests were not run; the pinned Lab source and native simulation runtime were unavailable locally.

Reviews (1) · Last reviewed commit: "Add reset camera frame regression tests" · Reviewed by Greptile

@arena-review-bot

Copy link
Copy Markdown
Contributor

🤖 Isaac Lab-Arena Review Bot

Summary

This PR sets num_rerenders_on_reset = 1 in IsaacLabArenaManagerBasedRLEnvCfg, so reset camera observations show the reset state instead of a black or stale frame. It also adds a pixel-location test matrix and a Newton black-frame test. Turning this on by default makes sense for an evaluation library, and the remaining PhysX cases are tracked with strict xfails. I have two main concerns:

  • Episode-limited evaluations pay an extra render on every step near the end of a run.
  • Failures inside the new fixture don't fail CI.

This change also alters what camera policies see on the first step of every episode, so camera-based evaluation results can move. The PR's own OpenPI run went from 48.9% to 56.1% success. A line in the release notes would help, so nobody compares results from before and after this change directly.

Findings

🟡 Warning: isaaclab_arena/environments/isaaclab_arena_manager_based_env_cfg.py:190: In episode-limited runs, environments that have finished their last episode keep reaching their termination conditions. Isaac Lab's step() sends them through the reset path on every control step. With this default, each of those steps now does an extra sim.render(), even though no episode starts. This lasts until the last episode ends, which can be up to one episode long. The PR's cost estimates don't include it.

🟡 Warning: isaaclab_arena/tests/test_camera_reset_object_pose.py:182: Everything inside the reset_pose_frames fixture fails as a pytest setup error. That covers building the environment, the physics-position check, and the end-of-episode check. pytest_runtest_logreport in conftest.py only counts failures from the test call itself. So _close_persistent sees tests_failed=False, and according to the repo's own note, Kit then exits with code 0.

🔵 Improvement: test_camera_reset_object_pose.py:16: CAMERA_POSITION_W is an offset in the environment frame, not the world frame.

🔵 Improvement: test_camera_reset_object_pose.py:131: Every run writes a PNG per frame plus JSON files, and nothing reads them in CI.

Test Coverage and CI Cost

🔵 test_camera_reset_object_pose.py:23: In physx-rigid-hard and physx-deformable-hard, every frame-0 check is a strict xfail. So these two RTX environment builds don't test this PR's change. The ordinary PhysX cases seem to already catch an upstream Lab fix for the same issues.

🔵 test_camera_reset_object_pose.py:259: The Newton Franka test may repeat what the newton-*-hard matrix cases already check. Those cases also require a non-black frame 0 after sim.reset().

Limitation: the GPU test jobs hadn't run when this review was written (the image build was still in progress), so I couldn't check test results or durations.

Verdict

Minor fixes needed

@qianl-nv
qianl-nv merged commit 79cbb89 into main Dec 2, 2026
10 checks passed
@qianl-nv
qianl-nv deleted the qianl-nv/fix/default-reset-camera-render branch December 2, 2026 08:02
qianl-nv added a commit that referenced this pull request Dec 3, 2026
Cherry-pick #1797 (`79cbb89918a79dd2fe764368cdb8c85e111ea12a`) into
`release/0.4.0`. Render camera observations on reset by default, while
suppressing unnecessary reset renders after an episode-limited
evaluation has assigned all its episodes.

Addresses [NVBug 7141102](https://nvbugs.nvidia.com/7141102).

## What changes?

Set `num_rerenders_on_reset=1` for Arena environments using Lab's
existing rendering pipeline. Restore the configured value after each
step, including exceptions. Include the source PR's episode-limit and
camera reset regression coverage.

The cherry-pick applies without conflicts and has the same patch as the
merged commit.

## Validation and remaining limitation

The original visual comparisons and reset-render latency measurements
are in #1797. Its headless Newton recording validation reduced black
first camera images from 9/9 to 0/9.

This backport retains the known PhysX frame-zero pose limitation and its
test skips. The underlying geometry/transform publication issue remains
tracked in [NVBug 7183639](https://nvbugs.nvidia.com/7183639).

Signed-off-by: Qian Lin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants