-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Move TiledCamera implementation into Camera and deprecate TiledCamera. #5162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,37 @@ | ||
| Changelog | ||
| --------- | ||
|
|
||
| 4.5.26 (2026-04-02) | ||
| ~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
| Changed | ||
| ^^^^^^^ | ||
|
|
||
| * Unified :class:`~isaaclab.sensors.camera.Camera` and :class:`~isaaclab.sensors.camera.TiledCamera` | ||
| into a single implementation. :class:`Camera` now delegates all rendering to the | ||
| :class:`~isaaclab.renderers.Renderer` abstraction (same approach :class:`TiledCamera` used). | ||
| The public API is unchanged for :class:`Camera` users. | ||
| * **Breaking (TiledCamera users):** :attr:`~isaaclab.sensors.camera.CameraData.info` now correctly | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this was a bug from before, fixed while moving TiledCamera impl into Camera There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense — the old |
||
| returns ``list[dict[str, Any]]`` (per-camera, then per-data-type) as documented in | ||
| :class:`~isaaclab.sensors.camera.CameraData`. :class:`TiledCamera` previously returned a flat | ||
| ``dict``, which violated the documented contract. Migration: replace | ||
| ``camera.data.info[data_type]`` with ``camera.data.info[cam_idx][data_type]``. | ||
|
|
||
| Deprecated | ||
| ^^^^^^^^^^ | ||
|
|
||
| * :class:`~isaaclab.sensors.camera.TiledCamera` is deprecated. Use | ||
| :class:`~isaaclab.sensors.camera.Camera` directly — it now supports all renderer backends. | ||
| * :class:`~isaaclab.sensors.camera.TiledCameraCfg` is deprecated. Use | ||
| :class:`~isaaclab.sensors.camera.CameraCfg` directly. | ||
|
|
||
| Removed | ||
| ^^^^^^^ | ||
|
|
||
| * Removed :attr:`~isaaclab.sensors.camera.Camera.render_product_paths`. Render products are | ||
| now managed internally by the renderer backend and are not part of the public API. | ||
|
|
||
|
|
||
| 4.5.25 (2026-04-01) | ||
| ~~~~~~~~~~~~~~~~~~~ | ||
|
|
||
|
|
||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3,6 +3,7 @@ | |||||||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||||||||
| # SPDX-License-Identifier: BSD-3-Clause | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| import warnings | ||||||||||||||||||||||||||||||||
| from typing import TYPE_CHECKING | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| from isaaclab.utils import configclass | ||||||||||||||||||||||||||||||||
|
|
@@ -15,6 +16,18 @@ | |||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| @configclass | ||||||||||||||||||||||||||||||||
| class TiledCameraCfg(CameraCfg): | ||||||||||||||||||||||||||||||||
| """Configuration for a tiled rendering-based camera sensor.""" | ||||||||||||||||||||||||||||||||
| """Configuration for a tiled rendering-based camera sensor. | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .. deprecated:: 4.5.26 | ||||||||||||||||||||||||||||||||
| :class:`TiledCameraCfg` is deprecated. Use :class:`CameraCfg` directly — | ||||||||||||||||||||||||||||||||
| :class:`~isaaclab.sensors.camera.Camera` now uses the same renderer abstraction. | ||||||||||||||||||||||||||||||||
| """ | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| class_type: type["TiledCamera"] | str = "{DIR}.tiled_camera:TiledCamera" | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| def __post_init__(self): | ||||||||||||||||||||||||||||||||
| warnings.warn( | ||||||||||||||||||||||||||||||||
| "TiledCameraCfg is deprecated. Use CameraCfg directly.", | ||||||||||||||||||||||||||||||||
| DeprecationWarning, | ||||||||||||||||||||||||||||||||
| stacklevel=2, | ||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||
|
Comment on lines
26
to
+33
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,10 @@ | |
| import isaaclab.sim as sim_utils | ||
| from isaaclab.sensors.camera import TiledCamera, TiledCameraCfg | ||
|
|
||
| # Deprecation warnings from TiledCamera/TiledCameraCfg are expected in this file; | ||
| # the deprecation mechanism itself is validated in test_tiled_camera.py. | ||
| pytestmark = pytest.mark.filterwarnings("ignore::DeprecationWarning") | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is needed otherwise, the TiledCamera gets noisy in tests There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense — since this test exercises |
||
|
|
||
|
|
||
| @pytest.fixture() | ||
| def setup_camera(): | ||
|
|
@@ -241,9 +245,9 @@ def test_all_annotators_multi_tiled_camera(setup_camera): | |
| assert output["semantic_segmentation"].dtype == torch.uint8 | ||
| assert output["instance_segmentation_fast"].dtype == torch.uint8 | ||
| assert output["instance_id_segmentation_fast"].dtype == torch.uint8 | ||
| assert isinstance(info["semantic_segmentation"], dict) | ||
| assert isinstance(info["instance_segmentation_fast"], dict) | ||
| assert isinstance(info["instance_id_segmentation_fast"], dict) | ||
| assert isinstance(info[0]["semantic_segmentation"], dict) | ||
| assert isinstance(info[0]["instance_segmentation_fast"], dict) | ||
| assert isinstance(info[0]["instance_id_segmentation_fast"], dict) | ||
|
|
||
| for camera in tiled_cameras: | ||
| del camera | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe bump minor at least, since there is a breaking change and deprecation warning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point — you're right. This PR removes
render_product_paths, changes theinfoformat fromdicttolist[dict], and deprecatesTiledCamera/TiledCameraCfg. Per semver, that warrants at least a minor bump.4.6.0would be more appropriate than4.5.26here. 👍