Repository navigation
Simplify camera processor plumbing and count None read_output as published - #6
Open
mataylor-nvidia wants to merge 2 commits into
Conversation
Keep each request's data in its renderer group instead of re-indexing the request list, build the processor buffers once with the capture mask, and validate the reserved env_mask output name in CameraCfg.validate_config so the data-type helper only computes. Test the reserved name and processor-input validation through validate(CameraCfg) instead of the private helper, and assert the mask values and call count rather than only their length. Renderers draw every environment on each capture, so describe env_mask as the environments due for the capture rather than rows that still hold the previous one. Merge the two added changelog bullets for the feature.
Renderers written before read_output returned a flag return None. Treating that as unpublished silently skipped every tensor processor on those renderers, leaving processor outputs missing from CameraData.output. Only renderers that hold back a capture need to return False.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review follow-ups for isaac-sim#8871. Two commits; merge whichever you agree with.
Simplify camera processor plumbing and correct env_mask docs
render_into_cameraskeeps(index, render_data, camera_data)in each renderer group instead of re-indexingrequests(requests[index][1],read_output(*requests[index][1:])). This is closer to the code onmain._apply_tensor_processorsbuilds the buffers dict once with the capture mask and removes the mask before publishing, instead of merging{**buffers, **mask}twice per processor.env_maskoutput check moves from_render_data_typestoCameraCfg.validate_config, so the helper only computes data types.SensorBase.__init__validates the cfg first, so the error still fires before the camera builds anything._render_data_typeswith aSimpleNamespaceis folded intotest_camera_cfg_rejects_outputs_unsupported_by_renderer, throughvalidate(CameraCfg(...)). That test now also checks that processor inputs are validated against the renderer.masks == [[True, True]] * 4instead of only checking lengths.CameraCfgdocstring and the changelog now describeenv_maskas the environments due for the capture, whose frame and timestamp advance.replaceimport in the rst example, and the twoaddedbullets merged into one.Count a None read_output return as a published capture
With the PR as is, a custom renderer whose
read_outputreturnsNoneruns no processors. Its processor outputs never appear inCameraData.output, and the first lookup raises aKeyErrorthat is hard to trace.render_into_camerasnow usesread_output(...) is not False, so older renderers keep working; only a renderer that holds back a capture needs to returnFalse. The in-tree renderers still returnTrueexplicitly. This changes the Compatibility note in isaac-sim#8871's description.Open: env_mask with async OVRTX
The mask is the camera's current
_is_outdated. Async OVRTX publishes the previous request's capture, so withupdate_period > 0and staggered resets the mask belongs to request T while the pixels come from request T-1. A stateful processor would then update the wrong rows. OVRTX already copies pose, intrinsics and frame for the delayed capture inprepare_capture. Fixing this needs the mask there too, which changes the renderer interface, so it is not in this PR. The other option is to document that the mask is exact only for synchronous renderers.Validation
Windows, CUDA, Newton Warp renderer:
source/isaaclab/test/renderers/test_camera_output_contract.pyandtest_simulation_render_context.py: 49 passed. The PR head had 50; one test was folded into another.pre-commiton the changed files: passed.tools/changelog/cli.py check upstream/main: passed.