Skip to content

Commit 4a6845e

Browse files
committed
Remove the Kit visualizer's lidar drawing
An OvRTX lidar needs the OVRTX renderer, which the launcher rejects in any Kit run, so the Kit visualizer never received lidar hits. The debug-draw extension it imported is also not loaded by the Isaac Lab Kit apps, so every interactive Kit run only logged that lidar point drawing was unavailable. Newton GL and Viser keep their lidar overlay.
1 parent 86310c7 commit 4a6845e

4 files changed

Lines changed: 7 additions & 42 deletions

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* Removed lidar hit drawing from :class:`~isaaclab_visualizers.kit.KitVisualizer`. An OvRTX lidar needs the OVRTX
2+
renderer, which cannot run with Kit, so the Kit visualizer never had hits to draw and only logged that lidar point
3+
drawing was unavailable. Newton GL and Viser still draw lidar hits.

‎source/isaaclab_visualizers/isaaclab_visualizers/kit/kit_visualizer.py‎

Lines changed: 2 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import logging
1212
import signal
1313
import warnings
14-
from typing import TYPE_CHECKING, Any, ClassVar
14+
from typing import TYPE_CHECKING, ClassVar
1515

1616
import numpy as np
1717
import torch
@@ -27,7 +27,7 @@
2727
from isaaclab.visualizers.visualizer_cfg import PerspectiveCameraCfg
2828

2929
from isaaclab_visualizers.desktop_entry import write_desktop_entry
30-
from isaaclab_visualizers.lidar_points import LIDAR_POINT_COLOR, collect_lidar_hits, frame_visualizer_closeup
30+
from isaaclab_visualizers.lidar_points import frame_visualizer_closeup
3131

3232
from .kit_key_event_source import KitKeyEventSource
3333

@@ -99,8 +99,6 @@ def __init__(self, cfg: VisualizerCfg):
9999
self._app_pumped_this_step: bool = False
100100
self._controls_kit_timeline = False
101101
self._owns_kit_timeline = False
102-
self._lidar_draw = None
103-
self._lidar_draw_unavailable = False
104102
# Camera tracking state (replaces ViewportCameraController)
105103
self._interactive_scene = None # set from SimulationContext._interactive_scene in initialize()
106104
self._viewer_origin: torch.Tensor | None = None # world-space origin offset for eye/lookat
@@ -208,7 +206,6 @@ def step(self, dt: float) -> None:
208206
self._fabric.update_geometries(provider, self._sim.render_generation)
209207
if self.cfg.backend.origin_type == "asset":
210208
self._update_asset_tracking_camera()
211-
self._draw_lidar_points()
212209
self._app_pumped_this_step = self._pump_kit_app_update()
213210
if self._camera_image_provider is not None:
214211
image = self.current_image_view.frame.data if self.is_training_paused() else self.render_tiled_rgba_array()
@@ -226,41 +223,6 @@ def step(self, dt: float) -> None:
226223
# simulation / debug-vis step; re-apply PointInstancer invisibleIds each step when partial viz is on.
227224
self._refresh_partial_viz_point_instancers_if_needed()
228225

229-
def _draw_lidar_points(self) -> None:
230-
"""Draw one environment's lidar hits in the Kit viewport.
231-
232-
Debug draw is a viewport overlay, so the lidar product does not scan the points. A missing
233-
debug-draw interface is reported once and the step continues.
234-
"""
235-
hits = collect_lidar_hits(self._sim, self._env_ids)
236-
if hits is None:
237-
return
238-
draw = self._lidar_debug_draw()
239-
if draw is None:
240-
return
241-
draw.clear_points()
242-
color = (*LIDAR_POINT_COLOR, 1.0)
243-
for _, points in hits:
244-
if len(points) == 0:
245-
continue
246-
positions = [(float(point[0]), float(point[1]), float(point[2])) for point in points]
247-
draw.draw_points(positions, [color] * len(positions), [6.0] * len(positions))
248-
249-
def _lidar_debug_draw(self) -> Any | None:
250-
"""Return the Kit debug-draw interface, or None when it cannot be acquired."""
251-
if self._lidar_draw_unavailable:
252-
return None
253-
if self._lidar_draw is None:
254-
try:
255-
from isaacsim.util.debug_draw import _debug_draw
256-
257-
self._lidar_draw = _debug_draw.acquire_debug_draw_interface()
258-
except Exception as exc:
259-
logger.warning("[KitVisualizer] Lidar point drawing is unavailable: %s", exc)
260-
self._lidar_draw_unavailable = True
261-
return None
262-
return self._lidar_draw
263-
264226
def close(self) -> None:
265227
"""Close viewport resources and restore temporary state."""
266228
if not self._is_initialized:

‎source/isaaclab_visualizers/isaaclab_visualizers/lidar_points.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SPDX-License-Identifier: BSD-3-Clause
55

6-
"""World-frame lidar hits shared by the Newton GL, Viser, and Kit visualizers."""
6+
"""World-frame lidar hits drawn by Newton GL and Viser, and the default camera framing they share with Kit."""
77

88
from __future__ import annotations
99

‎source/isaaclab_visualizers/test/test_lidar_points.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# SPDX-License-Identifier: BSD-3-Clause
55

6-
"""World-frame lidar hits drawn by the Newton GL, Viser, and Kit visualizers."""
6+
"""World-frame lidar hits drawn by the Newton GL and Viser visualizers."""
77

88
from __future__ import annotations
99

0 commit comments

Comments
 (0)