Repository navigation
Conversation
|
run-ci |
There was a problem hiding this comment.
Isaac Lab Review Bot
The change conditionally trims exported environment roots when clone-plan destinations target the roots themselves, while retaining roots for plans targeting descendant prims. The accompanying tests cover both export shapes.
- Design and architecture: Reviewed the new private
_clone_targets_env_rootspredicate and its use in selectingkeep_env_roots. It is consistent with the existing/World/envs/env_0convention and leaves the OVStage branch unchanged. A residual limitation is that the stage-wide boolean assumes clone plans do not mix root-targeting and descendant-targeting rows. - API: No public API changes were introduced: renderer configuration,
ClonePlan, andexport_stage_to_stringremain unchanged. The helper is private, and the package includes a past-tense changelog fragment. - Implementation: The changed
prepare_stageexport path and regression tests were traced. Root-targeting plans now omit non-source environment roots, while descendant-targeting plans retain empty roots for their transforms. The tests validate the resulting USD export structure, though they do not exercise an actual OVRTX backend clone.
No blocking issues. No inline issue met the actionable-evidence threshold; the assessment above records the review feedback.
Automated review; human maintainers own approval decisions.
|
|
run-ci |
|
The homogeneous clone fix and camera-scoped RenderVar fix both look useful. I suggest two small simplifications:
My earlier abbreviated diff showed the additions but omitted the helper deletion. The complete production-only suggestion below makes the accounting explicit, against
No extra class or replacement helper is introduced. This is a small boundary cleanup, not a large LOC reduction or a claim that the whole PR becomes net-negative. Complete suggested diff for both production files--- a/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py
+++ b/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_renderer.py
@@ -106,7 +106,7 @@
if TYPE_CHECKING:
from isaaclab_ppisp import PpispPipeline
- from ovrtx import AttributeBinding, FrameOutput, RenderVarOutput
+ from ovrtx import AttributeBinding
from isaaclab.renderers.base_renderer import VisualMaterialBatch
from isaaclab.sensors.camera.camera_data import CameraData
@@ -279,17 +279,21 @@
class OVRTXCameraRenderData:
"""Owns one camera sensor's native resources and Warp output buffers."""
- def __init__(self, spec: CameraRenderSpec, device, render_scope_name: str):
+ def __init__(self, spec: CameraRenderSpec, device, camera_scope: str):
"""Create render data for a camera in its assigned render scope.
Args:
spec: Camera render specification.
device: Rendering device.
- render_scope_name: Root scope containing this camera's render product and RenderVars.
- """
- self.render_scope_name = render_scope_name
- self.render_product_name = "RenderProduct"
- self.render_product_path = f"/{render_scope_name}/{self.render_product_name}"
+ camera_scope: Root scope containing this camera's render product and RenderVars.
+ """
+ self.camera_scope = camera_scope
+ self.render_var_keys = (
+ {source: f"/{camera_scope}/Vars/{name}" for source, name in _RENDER_VAR_PRIM_NAMES.items()}
+ if uses_prim_path_render_vars(OVRTX_VERSION)
+ else {source: source for source in _RENDER_VAR_PRIM_NAMES}
+ )
+ self.render_product_path = f"/{camera_scope}/RenderProduct"
self.camera_xform_binding = None
self.camera_xform_query = None
self.resources = contextlib.ExitStack()
@@ -565,11 +569,11 @@
if self._exported_usd_string is None:
raise RuntimeError("Expected an exported USD string from stage")
- scope = render_data.render_scope_name
+ scope = render_data.camera_scope
render_product_path = render_data.render_product_path
render_product_string = build_render_product_as_string(
spec,
- render_data,
+ scope,
device_id=self._warp_device.ordinal,
enable_shadows=self.cfg.enable_shadows,
)
@@ -934,9 +938,7 @@
raise ValueError("Cameras sharing an OVRTX renderer must use the same device.")
self._warp_device = warp_device
self._device = str(warp_device)
- render_data = OVRTXCameraRenderData(
- spec, self._device, render_scope_name=f"RenderCamera_{self._next_camera_id}"
- )
+ render_data = OVRTXCameraRenderData(spec, self._device, camera_scope=f"RenderCamera_{self._next_camera_id}")
try:
if not self._initialized_scene:
self._initialize_camera_render_data_from_spec(spec, render_data)
@@ -974,11 +976,11 @@
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/.")
- scope = render_data.render_scope_name
+ scope = render_data.camera_scope
product_path = render_data.render_product_path
usd = build_render_product_as_string(
spec,
- render_data,
+ scope,
device_id=self._warp_device.ordinal,
enable_shadows=self.cfg.enable_shadows,
)
@@ -1276,17 +1278,6 @@
)
return output_colors
- @staticmethod
- def _get_render_var_output(
- render_data: OVRTXCameraRenderData, frame: FrameOutput, source_name: str
- ) -> RenderVarOutput | None:
- """Resolve a render-var source name to the installed OVRTX frame key and read its output."""
- render_var_key = source_name
- if uses_prim_path_render_vars(OVRTX_VERSION):
- prim_name = _RENDER_VAR_PRIM_NAMES[source_name]
- render_var_key = f"/{render_data.render_scope_name}/Vars/{prim_name}"
- return frame.render_vars.get(render_var_key)
-
@contextlib.contextmanager
def _map_render_var_to_dlpack(self, render_var: Any) -> Iterator[wp.array]:
"""Map ``render_var`` for CUDA reads and yield it as a Warp array.
@@ -1344,7 +1335,7 @@
buffer_key: Data type key into ``output_buffers``.
colorize: If True, IDs are mapped to RGBA colors; otherwise raw uint32 IDs are copied.
"""
- render_var = self._get_render_var_output(render_data, frame, render_var_key)
+ render_var = frame.render_vars.get(render_data.render_var_keys[render_var_key])
if render_var is None or buffer_key not in output_buffers:
return
@@ -1385,7 +1376,7 @@
render_data: OVRTX render data for the current frame.
frame: OVRTX frame holding the mapped render vars.
"""
- semantic_id_map = self._get_render_var_output(render_data, frame, _SEMANTIC_ID_MAP_VAR)
+ semantic_id_map = frame.render_vars.get(render_data.render_var_keys[_SEMANTIC_ID_MAP_VAR])
if semantic_id_map is None:
return
@@ -1423,7 +1414,7 @@
frame: OVRTX frame holding the mapped render vars.
"""
resolved = {
- key: self._get_render_var_output(render_data, frame, key) for key in _INSTANCE_SEGMENTATION_MAP_VARS
+ key: frame.render_vars.get(render_data.render_var_keys[key]) for key in _INSTANCE_SEGMENTATION_MAP_VARS
}
missing = [key for key, render_var in resolved.items() if render_var is None]
if missing:
@@ -1561,7 +1552,7 @@
# is available, so without this a missing SemanticIdMap on a later frame would leave a stale mapping.
render_data.renderer_info.clear()
- ldr_color = self._get_render_var_output(render_data, frame, _LDR_COLOR_VAR)
+ ldr_color = frame.render_vars.get(render_data.render_var_keys[_LDR_COLOR_VAR])
if ldr_color is not None:
buffer_key = None
@@ -1580,7 +1571,7 @@
self._extract_rgba_tiles(render_data, tiled_data, output_buffers, buffer_key)
for depth_var, buffer_keys in _DEPTH_VAR_BUFFER_KEYS.items():
- depth_render_var = self._get_render_var_output(render_data, frame, depth_var)
+ depth_render_var = frame.render_vars.get(render_data.render_var_keys[depth_var])
if depth_render_var is None:
continue
if not any(buffer_key in output_buffers for buffer_key in buffer_keys):
@@ -1592,12 +1583,12 @@
)
self._extract_depth_tiles(render_data, tiled_depth_data, output_buffers, buffer_keys)
- albedo_var = self._get_render_var_output(render_data, frame, _ALBEDO_VAR)
+ albedo_var = frame.render_vars.get(render_data.render_var_keys[_ALBEDO_VAR])
if albedo_var is not None and "albedo" in output_buffers:
with self._map_render_var_to_dlpack(albedo_var) as tiled_albedo_data:
self._extract_rgba_tiles(render_data, tiled_albedo_data, output_buffers, "albedo", suffix="albedo")
- hdr_color = self._get_render_var_output(render_data, frame, _HDR_COLOR_VAR)
+ hdr_color = frame.render_vars.get(render_data.render_var_keys[_HDR_COLOR_VAR])
if hdr_color is not None and "rgb_hdr" in output_buffers:
with self._map_render_var_to_dlpack(hdr_color) as tiled_hdr_data:
tiled_hdr_data = self._prepare_ppisp_hdr_source(render_data, tiled_hdr_data, output_buffers)
@@ -1628,7 +1619,7 @@
if "instance_segmentation" in output_buffers:
self._process_instance_segmentation_maps(render_data, frame)
- normals_var = self._get_render_var_output(render_data, frame, _NORMALS_VAR)
+ normals_var = frame.render_vars.get(render_data.render_var_keys[_NORMALS_VAR])
if normals_var is not None and "normals" in output_buffers:
with self._map_render_var_to_dlpack(normals_var) as tiled_normals_data:
self._launch_extract_all_tiles(render_data, tiled_normals_data, output_buffers["normals"])
@@ -1636,7 +1627,7 @@
# For motion vectors, extract only the first two (u, v) channels from the tiled buffer.
# Note: mirrors the Isaac RTX renderer's handling of the "TargetMotionSD" AOV
# (check: https://github.com/isaac-sim/IsaacLab/issues/2003).
- motion_var = self._get_render_var_output(render_data, frame, _MOTION_VECTORS_VAR)
+ motion_var = frame.render_vars.get(render_data.render_var_keys[_MOTION_VECTORS_VAR])
if motion_var is not None and "motion_vectors" in output_buffers:
with self._map_render_var_to_dlpack(motion_var) as tiled_motion_vectors_data:
self._launch_extract_all_tiles(render_data, tiled_motion_vectors_data, output_buffers["motion_vectors"])
@@ -1933,11 +1924,11 @@
if self._exported_usd_string is None:
raise RuntimeError("Expected an exported USD string from stage")
- scope = render_data.render_scope_name
+ scope = render_data.camera_scope
render_product_path = render_data.render_product_path
render_product_string = build_render_product_as_string(
spec,
- render_data,
+ scope,
device_id=self._warp_device.ordinal,
enable_shadows=self.cfg.enable_shadows,
)
--- a/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_usd.py
+++ b/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_usd.py
@@ -17,8 +17,6 @@
if TYPE_CHECKING:
from isaaclab.renderers.camera_render_spec import CameraRenderSpec
-
- from isaaclab_ov.renderers.ovrtx_renderer import OVRTXCameraRenderData
logger = logging.getLogger(__name__)
@@ -96,20 +94,20 @@
)
-def get_render_var_config(data_types: list[str], render_scope_name: str) -> tuple[str, str, str]:
+def get_render_var_config(data_types: list[str], camera_scope: str) -> tuple[str, str, str]:
"""Return the first supported render-var configuration for ``data_types``.
Args:
data_types: Requested camera data types.
- render_scope_name: Root scope containing the render product and its render vars.
+ camera_scope: Root scope containing the render product and its render vars.
Returns:
The render-var config, defaulting to ``LdrColor`` when no entry is supported.
"""
- return get_render_var_configs(data_types, render_scope_name)[0]
-
-
-def get_render_var_configs(data_types: list[str], render_scope_name: str) -> list[tuple[str, str, str]]:
+ return get_render_var_configs(data_types, camera_scope)[0]
+
+
+def get_render_var_configs(data_types: list[str], camera_scope: str) -> list[tuple[str, str, str]]:
"""Return render-var configs for the requested camera data types.
Shared sources are de-duplicated. Unsupported data types are logged and skipped; if no
@@ -117,7 +115,7 @@
Args:
data_types: Requested camera data types.
- render_scope_name: Root scope containing the render product and its render vars.
+ camera_scope: Root scope containing the render product and its render vars.
Returns:
Render-var configs as (absolute prim path, prim name, source name) tuples.
@@ -153,7 +151,7 @@
# instance_segmentation, so it is authored once when either output is requested.
if "semantic_segmentation" in data_types or "instance_segmentation" in data_types:
render_vars.append(_SEGMENTATION_MAP_RENDER_VARS[2])
- return [(f"/{render_scope_name}/Vars/{name}", name, source) for name, source in render_vars]
+ return [(f"/{camera_scope}/Vars/{name}", name, source) for name, source in render_vars]
def render_var_prim_names_by_source() -> Mapping[str, str]:
@@ -165,24 +163,24 @@
return _RENDER_VAR_PRIM_NAME_BY_SOURCE
-def render_var_prim_paths_by_source(render_scope_name: str) -> Mapping[str, str]:
+def render_var_prim_paths_by_source(camera_scope: str) -> Mapping[str, str]:
"""Return the authored RenderVar prim path of every OVRTX render-var source.
Args:
- render_scope_name: Root scope containing the render product and its render vars.
+ camera_scope: Root scope containing the render product and its render vars.
Returns:
Read-only mapping of render-var source name to the absolute path of the ``RenderVar``
prim this module authors for it.
"""
return MappingProxyType(
- {source: f"/{render_scope_name}/Vars/{name}" for source, name in _RENDER_VAR_PRIM_NAME_BY_SOURCE.items()}
+ {source: f"/{camera_scope}/Vars/{name}" for source, name in _RENDER_VAR_PRIM_NAME_BY_SOURCE.items()}
)
def build_render_scope_usd(
spec: CameraRenderSpec,
- render_data: OVRTXCameraRenderData,
+ camera_scope: str,
*,
device_id: int | None = None,
enable_shadows: bool = False,
@@ -195,7 +193,7 @@
Args:
spec: Camera configuration, environment count, and camera paths. ISP configurations
automatically request the HDR render variable in addition to the configured outputs.
- render_data: Camera's render scope and product identity.
+ camera_scope: Name of the USD Scope containing this camera's render product and render vars.
device_id: CUDA device index the render product is pinned to via ``deviceIds``. When ``None``,
OVRTX assigns the device automatically.
enable_shadows: Whether lights cast shadows. Defaults to False. Only honored in RTX Minimal
@@ -209,7 +207,7 @@
data_types.append("rgb_hdr")
tiled_width, tiled_height = _tiled_resolution(spec.num_instances, spec.cfg.width, spec.cfg.height)
camera_path = f"/World/envs/env_0/{spec.camera_path_relative_to_env_0}"
- render_var_configs = get_render_var_configs(data_types, render_data.render_scope_name)
+ render_var_configs = get_render_var_configs(data_types, camera_scope)
minimal_mode = next(
(_RTX_MINIMAL_MODES[data_type] for data_type in data_types if data_type in _RTX_MINIMAL_MODES), None
)
@@ -252,9 +250,9 @@
)
return f'''
-def Scope "{render_data.render_scope_name}"
+def Scope "{camera_scope}"
{{
- def RenderProduct "{render_data.render_product_name}" (
+ def RenderProduct "RenderProduct" (
prepend apiSchemas = ["OmniRtxSettingsCommonAdvancedAPI_1"]
) {{
rel camera = [<{camera_path}>]{device_ids_line}
@@ -283,7 +281,7 @@
def build_render_product_as_string(
spec: CameraRenderSpec,
- render_data: OVRTXCameraRenderData,
+ camera_scope: str,
*,
device_id: int | None = None,
enable_shadows: bool = False,
@@ -298,7 +296,7 @@
Args:
spec: Camera configuration, environment count, and camera paths. ISP configurations
automatically request the HDR render variable in addition to the configured outputs.
- render_data: Camera's render scope and product identity.
+ camera_scope: Name of the USD Scope containing this camera's render product and render vars.
device_id: CUDA device index the render product is pinned to, so its render var buffers are
allocated on the same device as the Warp kernels that read them. When ``None``, OVRTX
assigns the device automatically.
@@ -308,8 +306,8 @@
Returns:
Render product USD layer, including the USDA header and default prim metadata.
"""
- camera_content = build_render_scope_usd(spec, render_data, device_id=device_id, enable_shadows=enable_shadows)
- return f'#usda 1.0\n(defaultPrim = "{render_data.render_scope_name}")\n' + camera_content
+ camera_content = build_render_scope_usd(spec, camera_scope, device_id=device_id, enable_shadows=enable_shadows)
+ return f'#usda 1.0\n(defaultPrim = "{camera_scope}")\n' + camera_content
def create_scene_partition_attributes(This production-only suggestion was syntax-checked and formatted with the repository's pinned Ruff; the USD builder produced identical text for two camera scopes across RGB, depth/normals, instance segmentation, and minimal shading. It is not applied to the PR and is not a complete tested repository patch: tests, the gallery caller, and migration text need the corresponding signature/attribute updates. Keep all known sources in Separately, |
fa7acda to
12a9fe2
Compare
|
run-ci |
…ing (#7954, #7950) (#7964) # Description Backport both #7954 and #7950 to `release/3.0.0` in this PR. - #7954 (`446f8411cb15092bd4f166e16bcd6860b34826cd`) fixed OVRTX 0.5 camera RenderVar paths and frame output lookups. The release branch was missing this prerequisite, and its own CI was already failing the legacy kitless rendering checks with missing RenderVar paths and empty camera outputs. - #7950 (`12a9fe20938a4536b9042cffd2e09e3ea9634c8b`) fixed homogeneous OVRTX clone plans by removing non-source environment roots from the exported stage when the clone targets those roots. Plans targeting prims beneath environment roots still keep the roots and their transforms. Both original changelog fragments and regression tests are included. No dependencies were added. ## Type of change - Bug fix ## Validation - `uv run --frozen --extra test --extra ovrtx python -m pytest source/isaaclab_ov/test/test_ovrtx_clone_plan.py source/isaaclab_ov/test/test_ovrtx_usd.py source/isaaclab_ov/test/test_ovrtx_compat.py source/isaaclab_ov/test/test_ovrtx_renderer_contract.py -q` — 111 passed. - `uv run --frozen --extra test --extra ov python -m pytest source/isaaclab_ov/test/test_ovrtx_renderer_rigid_object_rendering.py -q` — 2 passed. - `ISAACLAB_CHANGELOG_BASE_REF=release/3.0.0 uv run --frozen isaaclab -f` — passed, with the local release tracking ref aligned to the current upstream release head. ## Checklist - [x] I have read and understood the contribution guidelines. - [x] I have run the pre-commit checks. - [x] I have added tests for the fixes. - [x] I have added changelog fragments under `source/isaaclab_ov/changelog.d/`. - [x] Both original authors are listed in `CONTRIBUTORS.md`. --------- Co-authored-by: Richard Schmitt <[email protected]> Co-authored-by: Piotr Barejko <[email protected]>
…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
while investigating ovrtx 0.6.0 and ovstage 0.3.0 compatibility, i noticed this bug with homogeneous cloning in ovrtx. simple fix that isolates when we trim environment roots.
Fixes # (issue)
OVRTX cloning of homogeneous scenes, where every spawner is single-variant and the clone plan replicates the
environment roots themselves. The exported stage retained those roots, so cloning targeted prims that already
existed. The env roots were trimmed for such plans and kept for plans whose rows target prims beneath them.
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 there