Skip to content

Commit 77133d5

Browse files
authored
Adds a render config to the simulation and tiledCamera limitations to the docs (#1246)
# Description This change adds a render config to the simulation context and highlights current limitations and workarounds for issues with the TiledCamera class. ## Type of change - This change requires a documentation update ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
1 parent a56291d commit 77133d5

File tree

12 files changed

+289
-7
lines changed

12 files changed

+289
-7
lines changed

.github/workflows/docs.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Build & deploy docs
22

33
on:
44
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types: [opened, synchronize, reopened]
59

610
concurrency:
711
group: ${{ github.workflow }}-${{ github.ref }}

docs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ Table of Contents
9898
source/features/multi_gpu
9999
source/features/tiled_rendering
100100
source/features/reproducibility
101-
.. source/features/motion_generators
102101

103102
.. toctree::
104103
:maxdepth: 1

docs/source/api/lab/omni.isaac.lab.sim.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
SimulationContext
2020
SimulationCfg
2121
PhysxCfg
22+
RenderCfg
2223

2324
.. rubric:: Functions
2425

@@ -46,6 +47,11 @@ Simulation Configuration
4647
:show-inheritance:
4748
:exclude-members: __init__
4849

50+
.. autoclass:: RenderCfg
51+
:members:
52+
:show-inheritance:
53+
:exclude-members: __init__
54+
4955
Simulation Context Builder
5056
--------------------------
5157

docs/source/features/hydra.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ Elements in dictionaries are handled as a parameters in the hierarchy. For examp
8989

9090
.. literalinclude:: ../../../source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/manager_based/classic/cartpole/cartpole_env_cfg.py
9191
:language: python
92-
:lines: 99-111
93-
:emphasize-lines: 10
92+
:lines: 90-114
93+
:emphasize-lines: 11
9494

9595
the ``position_range`` parameter can be modified with ``env.events.reset_cart_position.params.position_range="[-2.0, 2.0]"``.
9696
This example shows two noteworthy points:
@@ -112,7 +112,7 @@ For example, for the configuration of the Cartpole camera depth environment:
112112
:language: python
113113
:start-at: class CartpoleDepthCameraEnvCfg
114114
:end-at: tiled_camera.width
115-
:emphasize-lines: 16
115+
:emphasize-lines: 10, 15
116116

117117
If the user were to modify the width of the camera, i.e. ``env.tiled_camera.width=128``, then the parameter
118118
``env.observation_space=[80,128,1]`` must be updated and given as input as well.

docs/source/features/tiled_rendering.rst

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Tiled-Camera Rendering
88
This feature is only available from Isaac Sim version 4.2.0 onwards.
99

1010
Tiled rendering in combination with image processing networks require heavy memory resources, especially
11-
at larger resolutions. We recommend running at 512 cameras in the scene on RTX 4090 GPUs or similar.
11+
at larger resolutions. We recommend running 512 cameras in the scene on RTX 4090 GPUs or similar.
1212

1313

1414
Tiled rendering APIs provide a vectorized interface for collecting data from camera sensors.
@@ -129,3 +129,39 @@ Instance Segmentation
129129
- If ``colorize_instance_segmentation=True`` in the camera config, a 4-channel RGBA image will be returned with dimension (B, H, W, 4) and type ``torch.uint8``. The info ``idToLabels`` dictionary will be the mapping from color to USD prim path of that semantic entity. The info ``idToSemantics`` dictionary will be the mapping from color to semantic labels of that semantic entity.
130130

131131
- If ``colorize_instance_segmentation=False``, a buffer of dimension (B, H, W, 1) of type ``torch.int32`` will be returned, containing the instance ID of each pixel. The info ``idToLabels`` dictionary will be the mapping from instance ID to USD prim path of that semantic entity. The info ``idToSemantics`` dictionary will be the mapping from instance ID to semantic labels of that semantic entity.
132+
133+
134+
Current Limitations
135+
-------------------
136+
137+
Due to current limitations in the renderer, we can have only **one** :class:`~sensors.TiledCamera` instance in the scene.
138+
For use cases that require a setup with more than one camera, we can imitate the multi-camera behavior by moving the location
139+
of the camera in between render calls in a step.
140+
141+
For example, in a stereo vision setup, the below snippet can be implemented:
142+
143+
.. code-block:: python
144+
145+
# render image from "first" camera
146+
camera_data_1 = self._tiled_camera.data.output["rgb"].clone() / 255.0
147+
# update camera transform to the "second" camera location
148+
self._tiled_camera.set_world_poses(
149+
positions=pos,
150+
orientations=rot,
151+
convention="world"
152+
)
153+
# step the renderer
154+
self.sim.render()
155+
self._tiled_camera.update(0, force_recompute=True)
156+
# render image from "second" camera
157+
camera_data_2 = self._tiled_camera.data.output["rgb"].clone() / 255.0
158+
159+
Note that this approach still limits the rendering resolution to be identical for all cameras. Currently, there is no workaround
160+
to achieve different resolution images using :class:`~sensors.TiledCamera`. The best approach is to use the largest resolution out of all of the
161+
desired resolutions and add additional scaling or cropping operations to the rendered output as a post-processing step.
162+
163+
In addition, there may be visible quality differences when comparing render outputs of different numbers of environments.
164+
Currently, any combined resolution that has a width less than 265 pixels or height less than 265 will automatically switch
165+
to the DLAA anti-aliasing mode, which does not perform up-sampling during anti-aliasing. For resolutions larger than 265 in both
166+
width and height dimensions, we default to using the "performance" DLSS mode for anti-aliasing for performance benefits.
167+
Anti-aliasing modes and other rendering parameters can be specified in the :class:`~sim.RenderCfg`.

docs/source/overview/core-concepts/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ This section we introduce core concepts in Isaac Lab.
99

1010
task_workflows
1111
actuators
12+
13+
# motion_generators

source/extensions/omni.isaac.lab/config/extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
# Note: Semantic Versioning is used: https://semver.org/
4-
version = "0.27.0"
4+
version = "0.27.1"
55

66
# Description
77
title = "Isaac Lab framework for Robot Learning"

source/extensions/omni.isaac.lab/docs/CHANGELOG.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
Changelog
22
---------
33

4+
0.27.1 (2024-10-20)
5+
~~~~~~~~~~~~~~~~~~~
6+
7+
Added
8+
^^^^^
9+
10+
* Added :class:`~omni.isaac.lab.sim.RenderCfg` and the attribute :attr:`~omni.isaac.lab.sim.SimulationCfg.render` for
11+
specifying render related settings.
12+
13+
414
0.27.0 (2024-10-14)
515
~~~~~~~~~~~~~~~~~~~
616

source/extensions/omni.isaac.lab/omni/isaac/lab/sim/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
from .converters import * # noqa: F401, F403
3030
from .schemas import * # noqa: F401, F403
31-
from .simulation_cfg import PhysxCfg, SimulationCfg # noqa: F401, F403
31+
from .simulation_cfg import PhysxCfg, RenderCfg, SimulationCfg # noqa: F401, F403
3232
from .simulation_context import SimulationContext, build_simulation_context # noqa: F401, F403
3333
from .spawners import * # noqa: F401, F403
3434
from .utils import * # noqa: F401, F403

source/extensions/omni.isaac.lab/omni/isaac/lab/sim/simulation_cfg.py

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,54 @@ class PhysxCfg:
152152
"""Size of particle contacts stream buffer allocated in pinned host memory. Default is 2 ** 20."""
153153

154154

155+
@configclass
156+
class RenderCfg:
157+
"""Configuration for Omniverse RTX Renderer.
158+
159+
These parameters are used to configure the Omniverse RTX Renderer.
160+
For more information, see the `Omniverse RTX Renderer documentation`_.
161+
162+
.. _Omniverse RTX Renderer documentation: https://docs.omniverse.nvidia.com/materials-and-rendering/latest/rtx-renderer.html
163+
"""
164+
165+
enable_translucency: bool = False
166+
"""Enables translucency for specular transmissive surfaces such as glass at the cost of some performance. Default is False."""
167+
168+
enable_reflections: bool = False
169+
"""Enables reflections at the cost of some performance. Default is False."""
170+
171+
enable_global_illumination: bool = False
172+
"""Enables Diffused Global Illumination at the cost of some performance. Default is False."""
173+
174+
antialiasing_mode: Literal["Off", "FXAA", "DLSS", "TAA", "DLAA"] = "DLSS"
175+
"""Selects the anti-aliasing mode to use. Defaults to DLSS."""
176+
177+
enable_dlssg: bool = False
178+
""""Enables the use of DLSS-G.
179+
DLSS Frame Generation boosts performance by using AI to generate more frames.
180+
DLSS analyzes sequential frames and motion data to create additional high quality frames.
181+
This feature requires an Ada Lovelace architecture GPU.
182+
Enabling this feature also enables additional thread-related activities, which can hurt performance.
183+
Default is False."""
184+
185+
dlss_mode: Literal[0, 1, 2, 3] = 0
186+
"""For DLSS anti-aliasing, selects the performance/quality tradeoff mode.
187+
Valid values are 0 (Performance), 1 (Balanced), 2 (Quality), or 3 (Auto). Default is 0."""
188+
189+
enable_direct_lighting: bool = True
190+
"""Enable direct light contributions from lights."""
191+
192+
samples_per_pixel: int = 1
193+
"""Defines the Direct Lighting samples per pixel.
194+
Higher values increase the direct lighting quality at the cost of performance. Default is 1."""
195+
196+
enable_shadows: bool = True
197+
"""Enables shadows at the cost of performance. When disabled, lights will not cast shadows. Defaults to True."""
198+
199+
enable_ambient_occlusion: bool = False
200+
"""Enables ambient occlusion at the cost of some performance. Default is False."""
201+
202+
155203
@configclass
156204
class SimulationCfg:
157205
"""Configuration for simulation physics."""
@@ -234,3 +282,6 @@ class SimulationCfg:
234282
235283
The material is created at the path: ``{physics_prim_path}/defaultMaterial``.
236284
"""
285+
286+
render: RenderCfg = RenderCfg()
287+
"""Render settings. Default is RenderCfg()."""

0 commit comments

Comments
 (0)