Repository navigation
Fix per-sensor render products in OVRTX - #7860
Conversation
|
run-ci |
|
There was a problem hiding this comment.
Isaac Lab Review Bot
The per-sensor render-product and pose-binding model addresses independent OVRTX camera rendering, but two ownership/API inconsistencies remain: the first camera’s embedded render product is not removed during camera cleanup, and the render-var path helper still reports only the default /Render scope.
- Design and architecture: Per-camera
OVRTXRenderDataownership is coherent for cameras registered through_register_camera. However, the first camera remains asymmetric: its pose resources move into the per-cameraExitStack, while its render product stays embedded in the shared stage until renderer shutdown, despite camera cleanup removing its bookkeeping entry. - API: The trailing
render_scope_name="Render"parameters preserve existing callers and default paths. However,render_var_prim_paths_by_source()still documents and returns fixed/Render/Vars/...paths even though subsequent cameras author render vars underRenderCamera_N; the helper must become scope-aware or explicitly document its restricted meaning. - Implementation: Per-product rendering, camera relationship updates, pose bindings, and idempotent per-camera buffer cleanup are implemented for both legacy and ovstage paths. The remaining implementation issue is that only dynamically registered camera products receive removal callbacks, so cleaning up the initial camera leaves its native product resident until the shared renderer closes.
Minor fixes needed. Posted 2 actionable findings inline.
Automated review; human maintainers own approval decisions.
| if not self._initialized_scene: | ||
| self._initialize_from_spec(spec) | ||
| return OVRTXRenderData(spec, self._device) | ||
| render_data.render_product_path = self._render_product_paths[0] |
There was a problem hiding this comment.
🟡 Warning · Design Architecture — First camera's render product is never released
The initial product is authored into the combined stage string by _initialize_from_spec, so only its path and pose handle are moved into render_data. Unlike cameras added via _register_camera, no removal callback is registered, so cleanup() drops bookkeeping while the native product stays resident until close(). Register an equivalent product-removal callback for the first camera, or author it as a removable reference like the others.
|
|
||
| render_var_configs = get_render_var_configs(data_types) | ||
| render_var_configs = [ |
There was a problem hiding this comment.
🔵 Suggestion · Api — Render-var path helper stale for per-camera scopes
Render vars are now rewritten into /{render_scope_name}/Vars/..., but render_var_prim_paths_by_source() still returns fixed /Render/... paths and documents them as "the authored RenderVar prim path of every OVRTX render-var source". That statement now holds only for the first camera; cameras in RenderCamera_N scopes author elsewhere. Make the lookup scope-aware or document the restriction.
|
run-ci |
| self._renderer.open_usd_from_string(self._exported_usd_string) | ||
| self._exported_usd_string = None # Free memory | ||
| reference = self._renderer.add_usd_reference_from_string( | ||
| f'#usda 1.0\n(defaultPrim = "{scope}")\n' + render_product_string, f"/{scope}" | ||
| ) |
There was a problem hiding this comment.
I am not sure I understand this mechanics correctly. My understanding was that render products references the exported usd stage, so I thought we should open usd from render_product_string and add usd reference from _exported_usd_string.
There was a problem hiding this comment.
This is a question to be clear.
There was a problem hiding this comment.
I think you understood the issue in another comment. This function has weird name, initialization. I made a small change to rename initialize to initialize_camera_render_data but for the interface change we would have to tackle that as a separate PR.
There was a problem hiding this comment.
added few renames, but the interface rename needs to be addressed in a separate PR.
|
I reproduced a failure with two camera sensors and two environments on
The existing integration test supplies all environment paths manually. The test change below retains that case and adds source-stage discovery using the same lookup as GPU verification (NVIDIA A40, OVRTX
Regression test: diff --git a/source/isaaclab_ov/test/test_ovrtx_renderer_contract.py b/source/isaaclab_ov/test/test_ovrtx_renderer_contract.py
index d8b860810a..e0fd9e58aa 100644
--- a/source/isaaclab_ov/test/test_ovrtx_renderer_contract.py
+++ b/source/isaaclab_ov/test/test_ovrtx_renderer_contract.py
@@ -139,9 +139,11 @@ def test_ovrtx_supported_output_types_key_set():
@pytest.mark.integration
@pytest.mark.rendering
@pytest.mark.parametrize("use_ovstage", [False, True])
-def test_ovrtx_multiple_cameras_render_independent_views(monkeypatch, use_ovstage, tmp_path):
+@pytest.mark.parametrize("source_only_paths", [False, True], ids=["expanded", "source-only"])
+def test_ovrtx_multiple_cameras_render_independent_views(monkeypatch, use_ovstage, source_only_paths, tmp_path):
"""Check independent camera batches and save RGB/depth frames under pytest's temporary directory.
+ Cover both expanded camera paths and Newton's source-only USD camera paths.
Use ``--basetemp=/tmp/ovrtx-camera-frames`` to choose where pytest writes the captures.
Depth PNGs use a shared 0-8 m range (near is white); NPY files retain the raw depths [m].
"""
@@ -151,6 +153,7 @@ def test_ovrtx_multiple_cameras_render_independent_views(monkeypatch, use_ovstag
from isaaclab.cloner.clone_plan import ClonePlan
from isaaclab.renderers.camera_render_spec import CameraRenderSpec
+ from isaaclab.sim import find_matching_prims
from isaaclab.utils.math import convert_camera_frame_orientation_convention
from isaaclab.utils.warp import ProxyArray
@@ -221,11 +224,16 @@ def test_ovrtx_multiple_cameras_render_independent_views(monkeypatch, use_ovstag
["rgb", "distance_to_image_plane"] if index == 0 else ["rgb", "distance_to_image_plane", "normals"]
)
cfg.height, cfg.width = height, width
+ cfg.prim_path = f"/World/envs/env_[^/]+/cam{index}"
+ camera_paths = tuple(f"/World/envs/env_{i}/cam{index}" for i in range(2))
+ if source_only_paths:
+ # Match Camera._initialize_impl: discover paths in the source USD stage.
+ camera_paths = tuple(str(prim.GetPath()) for prim in find_matching_prims(cfg.prim_path, stage))
spec = CameraRenderSpec(
cfg=cfg,
device="cuda:0",
num_instances=2,
- camera_prim_paths=tuple(f"/World/envs/env_{i}/cam{index}" for i in range(2)),
+ camera_prim_paths=camera_paths,
view_count=2,
camera_path_relative_to_env_0=f"cam{index}",
)Proposed fix: construct the paths for all cloned environments after validating the source path, matching first-sensor initialization. diff --git a/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py b/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py
--- a/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py
+++ b/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py
@@ -974,6 +974,9 @@ class OVRTXRenderer(BaseRenderer):
camera_paths = list(spec.camera_prim_paths)
if not camera_paths or not camera_paths[0].startswith("/World/envs/env_0/"):
raise ValueError("OVRTX cameras must be under /World/envs/env_0/.")
+ camera_paths = [
+ f"/World/envs/env_{i}/{spec.camera_path_relative_to_env_0}" for i in range(spec.num_instances)
+ ]
scope = f"RenderCamera_{self._next_camera_id}"
data_types = list(spec.cfg.data_types or ["rgb"])
if spec.cfg.isp_cfg is not None and "rgb_hdr" not in data_types:Run the new cases with: uv run --extra ovrtx --extra test python -m pytest \
source/isaaclab_ov/test/test_ovrtx_renderer_contract.py \
-k 'multiple_cameras_render_independent_views and source-only' -q |
0e4e5f6 to
bdb0319
Compare
|
run-ci |
|
run-ci |
|
run-ci |
Resolve the OVRTX conflicts with per-sensor render products from isaac-sim#7860. Keep calibration bindings in each camera's resource stack and reuse its ovstage pose query for intrinsic updates. Preserve direct and renderer-led cleanup and independent camera selection in the contract tests. Validation: 46 OVRTX contract, rendered behavior, and architecture checks passed; full formatting and merge-content audits passed.
Backports #7860 to `release/3.0.0`. The original cherry-pick conflicted. An NVIDIA inference model proposed this resolution, and deterministic validation confirmed that it changes no paths outside the original PR. Because conflict resolution cannot be certified as an exact patch replay, this PR is intentionally a draft and requires release-maintainer review. | Field | Commit | |---|---| | Original merged change | `eaab09fd0a61ea1fe84067d25172797abc30b89a` | | Release base used | `5da679fe1cef93813e5fc52dce0db81b6faae19e` | | Proposed backport | `8889ead77e32eb4257b4925ba059c603ced9b901` | Co-authored-by: Piotr Barejko <[email protected]>
# Description * Update left overs related to `/Render` scope prefix that hasn't been addressed in the previous PR #7860 * Address breaking change in the integration between 0.4 and 0.5. Previously we looked up outputs using Labels, now we need to use full path to get access to RenderVarOutput. * Refactor core functions and tests related to the logic above. ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (existing functionality will not work without user modification) - Documentation update ## Release backport - [ ] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Please attach before and after screenshots of the change if applicable. <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## Checklist Docker and GPU tests run on demand. Push the commits you want tested, then comment `run-ci` on the pull request. - [ ] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump `extension.toml` — CI handles that) - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task -->
# Description * Update left overs related to `/Render` scope prefix that hasn't been addressed in the previous PR isaac-sim#7860 * Address breaking change in the integration between 0.4 and 0.5. Previously we looked up outputs using Labels, now we need to use full path to get access to RenderVarOutput. * Refactor core functions and tests related to the logic above. ## Type of change <!-- As you go through the list, delete the ones that are not applicable. --> - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (existing functionality will not work without user modification) - Documentation update ## Release backport - [ ] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Screenshots Please attach before and after screenshots of the change if applicable. <!-- Example: | Before | After | | ------ | ----- | | _gif/png before_ | _gif/png after_ | To upload images to a PR -- simply drag and drop an image while in edit mode and it should upload the image directly. You can then paste that source into the above before/after sections. --> ## Checklist Docker and GPU tests run on demand. Push the commits you want tested, then comment `run-ci` on the pull request. - [ ] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [ ] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added a changelog fragment under `source/<pkg>/changelog.d/` for every touched package (do **not** edit `CHANGELOG.rst` or bump `extension.toml` — CI handles that) - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task --> (cherry picked from commit 446f841)
…ng docs (#7957) Backports the three changes from the September 20–23 `develop` audit that are missing from `release/3.0.0`, alongside the existing cloning-guide backport: - #7722 (`4cf439dfeb`): reject a second `SimulationContext` construction instead of silently discarding its configuration. Includes the original fixture cleanup and regression coverage. - #7893 (`22fcd71bc4`): validate DelayBuffer lag values before mutating its live configuration. - #7947 (`6e9ef17f59`): make `v3.0.0-EA` the default documentation version in deployment and local multi-version builds. - #7129 (`354168560f`): clarify that `replicate_physics=False` skips the active physics context while other declared replication contexts still run. **Compatibility:** repeated `SimulationContext(...)` calls now raise. Retrieve the live context with `SimulationContext.instance()`, or call `clear_instance()` before constructing a replacement. The original major changelog fragment includes this migration. The runtime and test files match current `develop`. The docs-default backport adapts the release branch's existing redirect template, validates the target page, and preserves explicit overrides. The cloning-guide backport preserves the current release APIs; its obsolete sections were already removed. ## Release audit Checked all **35 PRs** merged into `develop` from **2026-09-20 16:43:18 UTC** through `cff81e8473` (September 23), against release head `5d3e0b695e`. **32 are already covered; the remaining three are included here.** Git history, patch equivalence, GitHub's merged PR list, and remaining file differences were checked. Branch-specific version/changelog compilation and existing release-only changes are preserved. <details> <summary>Already covered PRs</summary> 26 have an equivalent patch in release: #7919, #7922, #7923, #7924, #7925, #6758, #7928, #7902, #7927, #7891, #7931, #7691, #7861, #7929, #7916, #7939, #4609, #7942, #7940, #7948, #7937, #7955, #7960, #7961, #7970, #7958. Six were squash-merged or adapted: #7530 and #7899 in #7926; #7637 in #7933; #7860 in #7936; #7954 and #7950 in #7964. Their implementation differences were checked against the current release tree. </details> ## Validation - **276 tests passed**: SimulationContext (51, including CPU/CUDA), headless context construction (15), nine schema/fragment suites (165), four manager suites (38), and DelayBuffer (7). - Both backported regressions reproduce with the original release implementations. - Docs redirect recipe: local/deployment EA defaults, explicit override, and missing-target rejection passed with a stubbed Sphinx builder. - All 22 changed files match the intended backport scope; `uv run isaaclab -f` and `git diff --check` passed. - Fresh Sphinx validation (`-b dummy -W --keep-going`): passed without warnings, excluding static assets as the HTML builder does. Full HTML documentation CI is running. Local runtime validation used PyTorch 2.12.0, CUDA 13.0, Isaac Sim 6.0.1.0, and an RTX 5090. Existing runtime/deprecation warnings occurred; the CI jobs validate the pinned environments. The previous [docs CI failure](https://github.com/isaac-sim/IsaacLab/actions/runs/35795116307/job/106972539281) was an external connection reset fetching the Omniverse intersphinx inventory, producing one warning under `-W`. That URL returned HTTP 200 when rechecked. This update starts a fresh docs build. --------- Co-authored-by: hujc <[email protected]> Co-authored-by: Zihan Xu <[email protected]>
Description
OVRTX camera sensors sharing a renderer previously reused the first sensor’s render product and camera bindings. This caused sensors to receive images from the same product, while pose updates could overwrite another sensor’s viewpoint.
Each sensor now owns a separate tiled render product and camera bindings, while sharing the renderer and scene. For example:
env0/cam0, env1/cam0→ RP0env0/cam1, env1/cam1→ RP1The change supports independent resolutions, output types, and pose updates on both the default and external-ovstage paths. OVRTXRenderData.cleanup() owns per-camera resource teardown, allowing other sensors to continue rendering.
Addresses the camera-ownership portion of #7772. Temporal instability remains a separate investigation, so this PR should not close that issue.
Checklist
Docker and GPU tests run on demand. Push the commits you want tested, then
comment
run-cion the pull request.pre-commitchecks with./isaaclab.sh --formatsource/<pkg>/changelog.d/for every touched package (do not editCHANGELOG.rstor bumpextension.toml— CI handles that)CONTRIBUTORS.mdor my name already exists thereRelease backport
develop