Skip to content

[Bug Report] reset() returns stale camera images when fabric is enabled - num_rerenders_on_reset re-renders the old transforms #6394

Closed

Description

@lukass16

Issue title

reset() returns stale camera images when fabric is enabled — num_rerenders_on_reset re-renders the old transforms

Body

Setup: Isaac Sim 6.0.0, manager-based env with a CameraCfg sensor,
use_fabric=True (default), and a reset event that randomizes asset poses.
Repro'd on the arena branch (55df2c3439, v3.0.0-beta); the relevant code
is identical on main.

What happens

If a reset event moves assets (e.g. reset events calling
write_root_pose_to_sim), the observations returned by reset() contain
camera images of the scene from before the reset, while all state
observations are post-reset. A policy's first inference each episode sees the
wrong scene, and recorded datasets have a corrupt first frame.

Repro in one number: teleport two tabletop objects a few cm in a reset event,
then compare the image returned by reset() with the image after one
zero-action step():

mean |reset_image − step_image| ≈ 5.0    # expected ≈ 0; the objects visibly
                                         # sit at their OLD positions

Setting num_rerenders_on_reset (the documented remedy) changes nothing
(diff 4.96 with 2 rerenders, 4.98 with 0).

Why

With fabric enabled, poses written through the PhysX tensor API only reach the
renderer during a physics step. reset() never steps physics:

self._reset_idx(env_ids)              # events teleport assets (PhysX tensor API)
self.scene.write_data_to_sim()
self.sim.forward()                    # does NOT sync PhysX -> fabric
for _ in range(self.cfg.num_rerenders_on_reset):
    self.sim.render()                 # re-renders the OLD fabric transforms
self.obs_buf = self.observation_manager.compute()   # image: old, state: new

Confirmed: ten consecutive sim.render() calls after such a reset still draw
the old scene; one sim.step() (or use_fabric=False) makes the reset image
correct (diff ≈ 0.3).

Suggested fix

When RTX sensors are present, sync the PhysX→fabric transforms (what a physics
step does) before the num_rerenders_on_reset render loop in
ManagerBasedEnv.reset() / the DirectRLEnv equivalent — or document that
under fabric these images cannot be refreshed without stepping physics.

Activity

  1. RandomOakForest commented on Jul 8, 2026

    @RandomOakForest
    Collaborator

    Thank you for posting this. The team will review it.

  2. added
    bug
    on Jul 8, 2026
  3. RandomOakForest commented on Jul 8, 2026

    @RandomOakForest
    Collaborator

    Following up, could you please provide a small repro example? Also, please try v3.0.0-beta2. Thanks.

  4. added
    question
    on Jul 8, 2026
  5. StriverAlex commented on Jul 22, 2026

    @StriverAlex

    I reproduced this with the exact version requested by the maintainer:

    • Isaac Lab: v3.0.0-beta2 (28a37cecdd433c22d9eabd6a5954add9f13a8951)
    • Isaac Sim: 6.0.1-alpha.17+develop.42429.af8ceaf7.gl
    • GPU: NVIDIA GeForce RTX 4090 D

    The regression test creates a local rigid red cube and an RTX camera, resets the
    simulation, moves the cube through write_root_pose_to_sim_index(), calls
    sim.forward(), and reads the camera before any public physics step. On the
    unmodified v3.0.0-beta2, the first frame still shows the old pose:

    first red fraction:  0.000000
    stable red fraction: 0.017014  # after one sim.step()
    

    The missing operation is in PhysxManager.forward(): updating articulation
    kinematics and Fabric does not finalize rigid-body tensor pose writes for RTX.
    Calling omni.physx.get_physx_interface().update_simulation(physics_dt, 0.0)
    before the Fabric update makes the tensor-written pose visible in the first
    frame.

    The same regression test passes after applying the fix to beta2.

    The patch keeps the public forward() contract intact: the public physics step
    count remains zero and registered IsaacLab PRE/POST physics-step callbacks are
    not invoked by this internal synchronization. A normal sim.step() still
    increments the counter and invokes each callback exactly once.

    I also rebased the proposed change onto current develop (b6342455) and
    verified the RTX regression, full test_simulation_context.py suite, and
    repository pre-commit checks there. The fix is proposed in #6661.

  6. self-assigned this
    on Sep 17, 2026
  7. pbarejko commented on Sep 17, 2026

    @pbarejko
    Collaborator

    I spent some time trying to repro this problem and I can not.

    •  Isaac Sim version                          Kit version
      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
       6.1.0-alpha.57+develop.0.766a393a.local    110.4.0+feature.0.62722523.local
      ─────────────────────────────────────────  ────────────────────────────────────
       6.1.0.0                                    110.3.0+feature.371399.00c488ae.gl
    

    I created custom unit test that covers this case. I can not repro

    Image
  8. added a commit that references this issue on Sep 21, 2026
  9. added a commit that references this issue on Sep 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugquestion

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions