Repository navigation
Render Newton RTX markers in the viewer and headless capture - #7529
diegoferigo-rai wants to merge 1 commit into
Conversation
Greptile SummaryThe PR enables Newton visualization markers in both interactive RTX rendering and headless RGB capture while preserving existing GL behavior.
Confidence Score: 5/5The PR appears safe to merge with no concrete blocking or non-blocking defects identified. The RTX paths now render markers with USD-safe temporary IDs, restore registry state even when rendering raises, and retain the prior raw-ID behavior for GL viewers. Important Files Changed
Sequence DiagramsequenceDiagram
participant V as Newton Visualizer
participant R as Marker Registry
participant M as Visualization Marker
participant RTX as RTX Viewer
V->>R: Get active marker groups
R-->>V: Marker groups
V->>M: Temporarily sanitize group_id
V->>M: Render marker
M->>RTX: Log marker using USD-safe path
V->>M: Restore original group_id
Reviews (1): Last reviewed commit: "Render Newton RTX markers in the viewer ..." | Re-trigger Greptile |
There was a problem hiding this comment.
Isaac Lab Review Bot
The change adds RTX-specific marker ID sanitization and invokes marker rendering in both interactive RTX frames and headless RGB capture while retaining the existing GL behavior.
- Design and architecture: The RTX/GL distinction remains localized at the visualization boundary. Marker IDs are temporarily replaced only during RTX rendering and restored in a finally block, preserving the registry key used for lifecycle management. The sanitizer’s many-to-one mapping remains a minor collision tradeoff, mitigated by the instance ID suffix in current group IDs.
- API: The marker-rendering helper gains a documented optional parameter that defaults to false, preserving existing callers and GL semantics. The private sanitization helper requires no exported API integration, and the user-visible change has an appropriate package changelog fragment.
- Implementation: The interactive and headless paths both render markers inside the existing begin-frame/end-frame lifecycle and honor enable_markers. Tests cover sanitization, restoration of the original registry ID, and unchanged unsanitized behavior. The local NewtonManager import is redundant but not materially problematic.
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.
|
thanks for the change. hm currently, visualization markers are not supported in the Newton RTX visualizer, so it this changed needed? |
The Newton RTX visualizer overlays visualization markers on a USD stage that rejects the "::" and other characters the marker registry group id carries, so both the interactive RTX viewer and a headless capture recorded through it dropped the goal poses, command arrows, and other debug markers the GL viewer draws every frame. Sanitize each marker group id into a valid USD prim path before logging it into the RTX viewer, render the markers on the RTX live-step path, and add the same marker pass to the RTX render_rgb_array headless capture. The GL viewer keeps rendering the raw registry ids, so its behavior is unchanged. This is the RTX counterpart of the still-open GL-only fix in isaac-sim#7011. Add unit tests for the group-id sanitization and for the render helper both restoring the original registry key after a sanitized RTX render and leaving the raw GL id untouched.
68368a5 to
ad50afd
Compare
|
Good question. This PR is effectively adding experimental visualization-marker support to Newton RTX: the existing Newton marker backend already works with Would you be open to supporting markers experimentally through this small RTX-specific sanitization for the time being? The implementation can then be streamlined together with the broader Newton RTX marker path in a future release. I can also update the documentation and PR description to make the experimental status explicit. |
|
if we can get visualization markers working for the newton RTX viewer, that would be a great change. the support from the newton side may take a bit more time. @matthewtrepte could you review this and see if allows the visualization markers to work correctly? |
|
thanks Diego! i confirmed this workaround does work for NewtonRTX visualizer. I moved your change into a PR based on top of tree with another fix - #8220. Closing this bug. |
…fix (#8220) Fixes two problems with the Newton RTX visualizer (`--visualizer newton_rtx`). This includes Diego Ferigo's commit from #7529, merged with current develop, so it supersedes that PR. **Markers.** The RTX viewer skipped visualization markers because their registry ids (`prim_path::id`) aren't valid USD prim paths. On the RTX path they are now rendered under a sanitized id, both live and in headless capture. The GL viewer is unchanged. **Black viewer.** With `ovrtx` 0.5, render outputs are keyed `/Render/Vars/LdrColor`, but Newton's `ViewerRTX` looks up `LdrColor`. The lookup failed silently, so the window was never drawn to and headless capture raised. `NewtonViewerRTX` now aliases the color output as `LdrColor` when `ovrtx` is 0.5 or newer, the same version split the OVRTX camera renderer has used since #7954. Both this and the id sanitizing are workarounds and carry a TODO. Nothing tested Newton RTX frames before, so I added `test_visualizer_integration_newton_rtx.py`. On the cartpole it checks that frames aren't flat, move while playing, freeze while the simulation is paused, and change when a marker is made visible. It's a separate kit-less module because OVRTX can't share a process with Kit. ## Testing - The adapter, viewer-release and new integration tests pass. Without the `LdrColor` fix the integration test and a unit test fail; without id sanitizing the marker check fails. - Ruff and the changelog check are clean. - On a live `newton_rtx` window with no patches, Kuka Allegro (4 envs, `newton_mjwarp`) renders the scene and the table markers. ## Notes - The `LdrColor` fix relies on Newton's private `_render_products` and on the key Newton authors (`/Render/Vars/LdrColor`), so it should go once Newton accepts both keys. There's no upstream issue yet. - `render_rgb_array()` on the async RTX viewer returns the previous submission, one frame behind. The test flushes once to compensate. - RTX has no Pause Rendering control, so that phase of the shared motion test runs for the GL viewer only. ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` --------- Co-authored-by: Diego Ferigo <[email protected]> Co-authored-by: Octi Zhang <[email protected]>
…fix (#8220) Fixes two problems with the Newton RTX visualizer (`--visualizer newton_rtx`). This includes Diego Ferigo's commit from #7529, merged with current develop, so it supersedes that PR. **Markers.** The RTX viewer skipped visualization markers because their registry ids (`prim_path::id`) aren't valid USD prim paths. On the RTX path they are now rendered under a sanitized id, both live and in headless capture. The GL viewer is unchanged. **Black viewer.** With `ovrtx` 0.5, render outputs are keyed `/Render/Vars/LdrColor`, but Newton's `ViewerRTX` looks up `LdrColor`. The lookup failed silently, so the window was never drawn to and headless capture raised. `NewtonViewerRTX` now aliases the color output as `LdrColor` when `ovrtx` is 0.5 or newer, the same version split the OVRTX camera renderer has used since #7954. Both this and the id sanitizing are workarounds and carry a TODO. Nothing tested Newton RTX frames before, so I added `test_visualizer_integration_newton_rtx.py`. On the cartpole it checks that frames aren't flat, move while playing, freeze while the simulation is paused, and change when a marker is made visible. It's a separate kit-less module because OVRTX can't share a process with Kit. ## Testing - The adapter, viewer-release and new integration tests pass. Without the `LdrColor` fix the integration test and a unit test fail; without id sanitizing the marker check fails. - Ruff and the changelog check are clean. - On a live `newton_rtx` window with no patches, Kuka Allegro (4 envs, `newton_mjwarp`) renders the scene and the table markers. ## Notes - The `LdrColor` fix relies on Newton's private `_render_products` and on the key Newton authors (`/Render/Vars/LdrColor`), so it should go once Newton accepts both keys. There's no upstream issue yet. - `render_rgb_array()` on the async RTX viewer returns the previous submission, one frame behind. The test flushes once to compensate. - RTX has no Pause Rendering control, so that phase of the shared motion test runs for the GL viewer only. ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` --------- Co-authored-by: Diego Ferigo <[email protected]> Co-authored-by: Octi Zhang <[email protected]> (cherry picked from commit 29e500d)
Description
This PR adds experimental visualization-marker support to the Newton RTX visualizer. Newton RTX overlays markers on a USD stage that rejects the
::and other characters carried by marker registry group ids (the registry key has the formprim_path::id). Without RTX-specific handling, both the interactivenewton_rtxviewer and headless captures omit goal poses, command arrows and the other debug markers drawn by the GL viewer.The change sanitizes each marker group id into a valid USD prim path before logging it into the RTX viewer, renders markers during the RTX live step, and adds the same marker pass to the RTX
render_rgb_arrayheadless capture. The sanitization is scoped to the RTX path through a newsanitize_group_idsargument onrender_newton_visualization_markers, restoring the original registry key after each render, so the GL viewer keeps rendering the raw ids and its behavior is unchanged.Newton RTX remains experimental. This implementation intentionally provides a small compatibility layer for the existing Newton marker backend and can be streamlined together with the broader Newton RTX marker path in a future release.
This is the RTX counterpart of the GL-only fix in #7011, kept as a separate PR so it can be reviewed on its own.
Tested with the unit tests, which need no simulator:
uv run --extra test python -m pytest \ source/isaaclab_visualizers/test/test_newton_adapter.py70 passed. The three added tests cover group-id sanitization, the RTX render sanitizing the id and restoring the original registry key, and the GL path still rendering the raw id.Type of change
Release backport
developScreenshots
Not attached: the markers are the same goal poses and command arrows the GL viewer already draws, now also visible in the RTX viewer and its captures. I can add before/after RTX captures if useful.
Checklist
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