Skip to content

[PR10] Follow declared clone namespaces across scene consumers - #8803

Open
ooctipus wants to merge 2 commits into
isaac-sim:mainfrom
ooctipus:refactor/pr10-lifecycle-audit
Open

ooctipus wants to merge 2 commits into
isaac-sim:mainfrom
ooctipus:refactor/pr10-lifecycle-audit

Conversation

@ooctipus

@ooctipus ooctipus commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Custom clone templates such as /Lab/Cells/Cell{} were accepted, but scene consumers still assumed /World/envs/env_0. This could miss camera clones, assign the wrong partitions, misorder frame-transformer rows, and break task or teleop lookups.

Use the existing clone plan, bound asset paths, and native world IDs throughout cameras/renderers, PhysX/OVPhysX frame views, couplers, task configurations, and XR. {ENV_REGEX_NS} follows the declared template; the default layout stays unchanged. Remove the old path-rewriting helpers and duplicate discovery paths.

Coverage: existing tests now exercise custom roots, native-only clones, external prototypes, numeric ordering past environment 9, missing/reordered camera rows, shared parents, markers, and XR anchors. A repository-wide regression check rejects hard-coded /World/envs paths in production code outside the central default declaration. Restoring the old assumptions reproduces the failures.

Validation: 463 focused checks and 18 renderer cases passed on CPU/GPU0, including 65 image comparisons with unchanged goldens and tolerances. Both frame-view benchmark scripts completed smoke runs; formatting and changelog checks passed. Full CI is requested on the pushed commit.

Camera-path performance measurements

Measured the initial camera-path change (d7b8595), before the broader namespace audit. GPU0 RTX 5090; 4,096 environments, RGB cameras, no viewer. Median step time across two processes × two 100-step batches after 10 warmup steps. Cartpole cameras: 96×96; Kuka: 64×64. Startup excluded because cache/disk conditions differed.

Task / physics / renderer Before → after (ms/step)
Cartpole / MJWarp / NewtonWarp 6.35 → 6.27
Cartpole / MJWarp / OVRTX 41.57 → 41.37
Cartpole / MJWarp / Isaac RTX 91.51 → 91.61
Cartpole / OVPhysX / NewtonWarp 9.10 → 9.20
Cartpole / OVPhysX / OVRTX 45.19 → 44.86
Cartpole / PhysX / NewtonWarp 8.35 → 8.23
Cartpole / PhysX / Isaac RTX 96.97 → 97.16
Kuka–Allegro / MJWarp / NewtonWarp 26.41 → 26.43
Kuka–Allegro / MJWarp / OVRTX 48.85 → 48.54
Kuka–Allegro / MJWarp / Isaac RTX 122.89 → 122.91

@ooctipus
ooctipus requested a review from a team October 24, 2026 01:13
@ooctipus

Copy link
Copy Markdown
Collaborator Author

run-ci

@github-actions github-actions Bot added documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team labels Oct 24, 2026
@isaaclab-bot isaaclab-bot Bot added ci:run-docker Trigger the on-demand Docker and GPU CI workflow and removed ci:run-docker Trigger the on-demand Docker and GPU CI workflow labels Oct 24, 2026
@greptile-apps

greptile-apps Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes reach camera rendering and Kit visualization across several simulation backends.

The PR appears safe to merge, with a non-blocking marker ownership issue for markers created before the simulation.

Findings

  1. P2 Early markers lose environment ownership ▶

Summary

The PR uses declared clone roots for camera bindings, RTX partitions, Kit visibility, and markers.

  • OVRTX camera partitions follow each camera's declared environment.
  • Isaac RTX partitions environments using the clone plan's roots.
  • Kit views and markers follow the clone plan's environment roots.
  • Cameras render through the simulation that owns them.
  • Lifecycle docs explain clone plans and simulation updates.

Reviews (1) · Last reviewed commit: "Use declared clone paths for camera part..." · Reviewed by Greptile

Comment on lines +235 to +237
plan = self._sim.get_clone_plan() if self._sim is not None else None
if plan is None:
return False

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Early markers lose environment ownership

Markers created before SimulationContext keep _sim=None, even when the later simulation adopts their stage. _ensure_kit_backend(sim) retains the existing backend without updating its owner. This new check therefore always returns False, so visualize(environment_ids=...) no longer assigns those markers to their environments after RTX prepares the stage.

Bind an existing ownerless backend when the simulation adopts its stage.

@isaaclab-review-bot isaaclab-review-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isaac Lab Review Bot

Needs attention: Scope and over-engineering (1), Test quality (1). Other reviewed categories look good.

  • PR description: The body matches the implementation and provides adequate performance evidence, but should explicitly note that the lifecycle section is replaced and retain its unchanged PhysicsManager contracts.
  • Design and architecture: Architecture looks good.
  • Scope and over-engineering: Minimal implementation: extend Camera, OVRTXRenderer, IsaacRtxRenderer, KitVisualizer, KitVisualizationMarkers, and VisualizationMarkers; no source modules or layers were added. Keep the clone-path documentation and changelogs, but restore the unchanged PhysicsManager lifecycle contract instead of replacing it. Scope is cohesive; no split recommended.
  • API: API changes look good.
  • Compatibility and deprecation: No breaking changes identified.
  • Implementation: Implementation looks good.
  • Style consistency: Style consistency looks good.
  • Test quality: The new backend and ownership regressions are necessary, but environment visibility is asserted twice under an unrelated spectator-setting parameter; move it to one focused test.

Minor fixes needed. Posted 2 inline findings.

Automated review; human maintainers own approval decisions.

configuration's ``class_type``. Their selection is independent of physics;
renderer instances are shared through the simulation registry described below.

Physics manager lifecycle

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning · Scope Complexity — Unrelated rewrite drops lifecycle contract docs

This rewrite deletes the PhysicsManager lifecycle section — forward/step/reset/close and PhysicsEvent MODEL_INIT/PHYSICS_READY/STOP, including close() dispatching STOP — which this diff does not change. Keep that section alongside the new construction text.

else:
assert partition_attr.Get() == expected_partition

visualizer._apply_env_visibility(stage, num_envs=4, visible_env_ids=[2])

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Warning · Test Quality — Visibility contract replayed across unrelated axis

_apply_env_visibility is a separate contract that the show_global_view axis does not branch on, so these assertions run identically in both rows under a name promising only partition behavior. Move them to their own test.

@ooctipus ooctipus changed the title [PR10] Use declared clone paths for camera partitions and Kit views [PR10] Follow declared clone namespaces across scene consumers Oct 24, 2026
@ooctipus

Copy link
Copy Markdown
Collaborator Author

run-ci

@github-actions github-actions Bot added the isaac-mimic Related to Isaac Mimic team label Oct 24, 2026
@isaaclab-bot isaaclab-bot Bot added the ci:run-docker Trigger the on-demand Docker and GPU CI workflow label Oct 24, 2026
@isaaclab-bot isaaclab-bot Bot removed the ci:run-docker Trigger the on-demand Docker and GPU CI workflow label Oct 24, 2026

This branch has not been deployed

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

Labels

documentation Improvements or additions to documentation isaac-lab Related to Isaac Lab team isaac-mimic Related to Isaac Mimic team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant