Draft: Per tile render history reset#6622
Conversation
1479a57 to
84e7ff4
Compare
| self._renderer.write_array_attribute( | ||
| prim_paths=[rp], | ||
| attribute_name="omni:rtx:viewTile:renderHistoryReset:tileIndices", | ||
| tensors=[tile_indices], | ||
| ) | ||
| self._renderer.write_attribute( | ||
| prim_paths=[rp], | ||
| attribute_name="omni:rtx:viewTile:renderHistoryReset:requestId", | ||
| tensor=np.array([self._render_history_reset_request_id], dtype=np.int32), | ||
| ) |
There was a problem hiding this comment.
Wondering if it makes sensor to create atrribute bindings? Env reset is not a rare op during training.
| """ | ||
| pass | ||
|
|
||
| def reset_tile_history(self, render_data: Any, env_ids: Sequence[int] | None) -> None: |
There was a problem hiding this comment.
I would just call it reset. reset_tile_history seems very specific. If it's called more generic as reset it could be reused for other reasons.
| return | ||
|
|
||
| if env_ids is None: | ||
| tile_indices = np.arange(render_data.num_envs, dtype=np.float32) |
There was a problem hiding this comment.
nit:
`/rtx/viewTile/renderHistoryReset/tileIndices`
* `float[]`
* `-1.0` resets all valid tiles
* `-2.0 `is no-op/default padding
* `0..N-1` reset selected flat tile indices
then this becomes:
if env_ids is None:
tile_indices = np.array([-1.0], dtype=np.float32)| # reset indices. The copy is negligible: this runs once per reset, | ||
| # not per frame, on an array of at most num_envs floats. | ||
| ids = env_ids.cpu() if isinstance(env_ids, torch.Tensor) else env_ids | ||
| tile_indices = np.asarray(ids, dtype=np.float32) |
There was a problem hiding this comment.
This could be fragile because you made an assumption:
rel camera = [
</World/envs/env_0/Camera>, # tile 0
</World/envs/env_1/Camera>, # tile 1
</World/envs/env_2/Camera>, # tile 2
]
could the mapping of the indices be different? i.e.
rel camera = [
</World/envs/env_0/Camera>, # tile 0
</World/envs/env_2/Camera>, # tile 2
</World/envs/env_1/Camera>, # tile 1
]
There was a problem hiding this comment.
Yeah good call out, since we author the camera rel in https://github.com/isaac-sim/IsaacLab/blob/develop/source/isaaclab_ov/isaaclab_ov/renderers/ovrtx_usd.py#L125 in env ascending order I will add a comment here about this assumption.
| self._render_history_reset_request_id += 1 | ||
| rp = self._render_product_paths[0] | ||
|
|
||
| self._renderer.write_array_attribute( |
There was a problem hiding this comment.
Since you experience problem with the feature, do we know if this write op succeeded? Can you read it back for debugging?
Description
./isaaclab.sh -p -m pytest -s -rA -k "ovphysx" source/isaaclab_tasks/test/core/test_rendering_history_reset_cartpole_kitless.pyStill get a faint streak post tile history reset:

Type of change
Screenshots
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there