Skip to content

Commit

Permalink
Merge branch 'new_tiled_rendering' of github.com:kellyguo11/IsaacLab …
Browse files Browse the repository at this point in the history
…into camera_benchmarks
  • Loading branch information
kellyguo11 committed Aug 9, 2024
2 parents 574ee8e + 9f51dc7 commit 571d0ff
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 16 deletions.
2 changes: 2 additions & 0 deletions source/apps/isaaclab.python.headless.kit
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ exts."omni.kit.window.viewport".blockingGetViewportDrawable = false
# Fix PlayButtonGroup error
exts."omni.kit.widget.toolbar".PlayButton.enabled = false

exts."omni.replicator.core".Orchestrator.enabled = false

[settings.app.settings]
persistent = true
dev_build = false
Expand Down
17 changes: 11 additions & 6 deletions source/apps/isaaclab.python.headless.rendering.kit
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,24 @@ app.version = "4.0.0"
# set the default ros bridge to disable on startup
isaac.startup.ros_bridge_extension = ""

# Enable new denoiser to reduce motion blur artifacts
rtx.newDenoiser.enabled=true
# Flags for better rendering performance
rtx.translucency.enabled = false
rtx.reflections.enabled = false
rtx.indirectDiffuse.enabled = false
rtx.transient.dlssg.enabled = false
rtx.directLighting.sampledLighting.enabled = true
rtx.directLighting.sampledLighting.samplesPerPixel = 1
rtx.sceneDb.ambientLightIntensity = 1.0
# rtx.shadows.enabled = false

# Disable present thread to improve performance
exts."omni.renderer.core".present.enabled=false

# Disabling these settings reduces renderer VRAM usage and improves rendering performance, but at some quality cost
rtx.raytracing.cached.enabled = false
rtx.raytracing.lightcache.spatialCache.enabled = false
rtx.ambientOcclusion.enabled = false
rtx-transient.dlssg.enabled = false

rtx.sceneDb.ambientLightIntensity = 1.0
rtx.directLighting.sampledLighting.enabled = true

# Avoids unnecessary GPU context initialization
renderer.multiGpu.maxGpuCount=1

Expand All @@ -69,6 +72,8 @@ app.audio.enabled = false
# Enable Vulkan - avoids torch+cu12 error on windows
app.vulkan = true

exts."omni.replicator.core".Orchestrator.enabled = false

[settings.exts."omni.kit.registry.nucleus"]
registries = [
{ name = "kit/default", url = "https://ovextensionsprod.blob.core.windows.net/exts/kit/prod/shared" },
Expand Down
2 changes: 2 additions & 0 deletions source/apps/isaaclab.python.kit
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ app.audio.enabled = false
# Enable Vulkan - avoids torch+cu12 error on windows
app.vulkan = true

exts."omni.replicator.core".Orchestrator.enabled = false

# Basic Kit App
################################
app.versionFile = "${exe-path}/VERSION"
Expand Down
17 changes: 11 additions & 6 deletions source/apps/isaaclab.python.rendering.kit
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,24 @@ app.version = "4.0.0"
# set the default ros bridge to disable on startup
isaac.startup.ros_bridge_extension = ""

# Enable new denoiser to reduce motion blur artifacts
rtx.newDenoiser.enabled=true
# Flags for better rendering performance
rtx.translucency.enabled = false
rtx.reflections.enabled = false
rtx.indirectDiffuse.enabled = false
rtx.transient.dlssg.enabled = false
rtx.directLighting.sampledLighting.enabled = true
rtx.directLighting.sampledLighting.samplesPerPixel = 1
rtx.sceneDb.ambientLightIntensity = 1.0
# rtx.shadows.enabled = false

# Disable present thread to improve performance
exts."omni.renderer.core".present.enabled=false

# Disabling these settings reduces renderer VRAM usage and improves rendering performance, but at some quality cost
rtx.raytracing.cached.enabled = false
rtx.raytracing.lightcache.spatialCache.enabled = false
rtx.ambientOcclusion.enabled = false
rtx-transient.dlssg.enabled = false

rtx.sceneDb.ambientLightIntensity = 1.0
rtx.directLighting.sampledLighting.enabled = true

# Avoids unnecessary GPU context initialization
renderer.multiGpu.maxGpuCount=1

Expand All @@ -66,6 +69,8 @@ app.hydraEngine.waitIdle=true

app.audio.enabled = false

exts."omni.replicator.core".Orchestrator.enabled = false

[settings.physics]
updateToUsd = false
updateParticlesToUsd = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def __del__(self):
# unsubscribe from callbacks
SensorBase.__del__(self)
# detach from the replicator registry
self._annotator.detach(self.render_product_paths)
for annotator in self._annotators.values():
annotator.detach(self.render_product_paths)

def __str__(self) -> str:
"""Returns: A string containing information about the instance."""
Expand Down Expand Up @@ -152,8 +153,7 @@ def _initialize_impl(self):
sensor_prim = UsdGeom.Camera(cam_prim)
self._sensor_prims.append(sensor_prim)

# start the orchestrator (if not already started)
rep.orchestrator._orchestrator._is_started = True
# get full resolution for all tiles
full_resolution = self._tiled_image_shape()

# Set carb settings for tiled rendering
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ def _apply_action(self) -> None:
def _get_observations(self) -> dict:
data_type = "rgb" if "rgb" in self.cfg.tiled_camera.data_types else "depth"
if "rgb" in self.cfg.tiled_camera.data_types:
camera_data = 1 - self._tiled_camera.data.output[data_type]
camera_data = self._tiled_camera.data.output[data_type]
# normalize the camera data for better training results
mean_tensor = torch.mean(camera_data, dim=(1, 2), keepdim=True)
camera_data -= mean_tensor
elif "depth" in self.cfg.tiled_camera.data_types:
camera_data = self._tiled_camera.data.output[data_type]
camera_data[camera_data == float("inf")] = 0
Expand Down

0 comments on commit 571d0ff

Please sign in to comment.