diff --git a/source/isaaclab_visualizers/changelog.d/esekkin-remove-kit-lidar-drawing.removed.rst b/source/isaaclab_visualizers/changelog.d/esekkin-remove-kit-lidar-drawing.removed.rst new file mode 100644 index 00000000000..f5f9de03275 --- /dev/null +++ b/source/isaaclab_visualizers/changelog.d/esekkin-remove-kit-lidar-drawing.removed.rst @@ -0,0 +1,2 @@ +* Removed lidar hit drawing from :class:`~isaaclab_visualizers.kit.KitVisualizer` because OvRTX lidars cannot run + with Kit. View lidar hits in the Newton GL or Viser visualizer. diff --git a/source/isaaclab_visualizers/isaaclab_visualizers/kit/kit_visualizer.py b/source/isaaclab_visualizers/isaaclab_visualizers/kit/kit_visualizer.py index 3232b2302c5..36eb0ab90d0 100644 --- a/source/isaaclab_visualizers/isaaclab_visualizers/kit/kit_visualizer.py +++ b/source/isaaclab_visualizers/isaaclab_visualizers/kit/kit_visualizer.py @@ -11,7 +11,7 @@ import logging import signal import warnings -from typing import TYPE_CHECKING, Any, ClassVar +from typing import TYPE_CHECKING, ClassVar import numpy as np import torch @@ -27,7 +27,7 @@ from isaaclab.visualizers.visualizer_cfg import PerspectiveCameraCfg from isaaclab_visualizers.desktop_entry import write_desktop_entry -from isaaclab_visualizers.lidar_points import LIDAR_POINT_COLOR, collect_lidar_hits, frame_visualizer_closeup +from isaaclab_visualizers.lidar_points import frame_visualizer_closeup from .kit_key_event_source import KitKeyEventSource @@ -99,8 +99,6 @@ def __init__(self, cfg: VisualizerCfg): self._app_pumped_this_step: bool = False self._controls_kit_timeline = False self._owns_kit_timeline = False - self._lidar_draw = None - self._lidar_draw_unavailable = False # Camera tracking state (replaces ViewportCameraController) self._interactive_scene = None # set from SimulationContext._interactive_scene in initialize() self._viewer_origin: torch.Tensor | None = None # world-space origin offset for eye/lookat @@ -208,7 +206,6 @@ def step(self, dt: float) -> None: self._fabric.update_geometries(provider, self._sim.render_generation) if self.cfg.backend.origin_type == "asset": self._update_asset_tracking_camera() - self._draw_lidar_points() self._app_pumped_this_step = self._pump_kit_app_update() if self._camera_image_provider is not None: 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: # simulation / debug-vis step; re-apply PointInstancer invisibleIds each step when partial viz is on. self._refresh_partial_viz_point_instancers_if_needed() - def _draw_lidar_points(self) -> None: - """Draw one environment's lidar hits in the Kit viewport. - - Debug draw is a viewport overlay, so the lidar product does not scan the points. A missing - debug-draw interface is reported once and the step continues. - """ - hits = collect_lidar_hits(self._sim, self._env_ids) - if hits is None: - return - draw = self._lidar_debug_draw() - if draw is None: - return - draw.clear_points() - color = (*LIDAR_POINT_COLOR, 1.0) - for _, points in hits: - if len(points) == 0: - continue - positions = [(float(point[0]), float(point[1]), float(point[2])) for point in points] - draw.draw_points(positions, [color] * len(positions), [6.0] * len(positions)) - - def _lidar_debug_draw(self) -> Any | None: - """Return the Kit debug-draw interface, or None when it cannot be acquired.""" - if self._lidar_draw_unavailable: - return None - if self._lidar_draw is None: - try: - from isaacsim.util.debug_draw import _debug_draw - - self._lidar_draw = _debug_draw.acquire_debug_draw_interface() - except Exception as exc: - logger.warning("[KitVisualizer] Lidar point drawing is unavailable: %s", exc) - self._lidar_draw_unavailable = True - return None - return self._lidar_draw - def close(self) -> None: """Close viewport resources and restore temporary state.""" if not self._is_initialized: diff --git a/source/isaaclab_visualizers/isaaclab_visualizers/lidar_points.py b/source/isaaclab_visualizers/isaaclab_visualizers/lidar_points.py index fa9ebb8f46f..8bbace38511 100644 --- a/source/isaaclab_visualizers/isaaclab_visualizers/lidar_points.py +++ b/source/isaaclab_visualizers/isaaclab_visualizers/lidar_points.py @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: BSD-3-Clause -"""World-frame lidar hits shared by the Newton GL, Viser, and Kit visualizers.""" +"""World-frame lidar hits drawn by Newton GL and Viser, and the default camera framing they share with Kit.""" from __future__ import annotations diff --git a/source/isaaclab_visualizers/test/test_lidar_points.py b/source/isaaclab_visualizers/test/test_lidar_points.py index 0a7b9d1ee61..e9cd5af5c4e 100644 --- a/source/isaaclab_visualizers/test/test_lidar_points.py +++ b/source/isaaclab_visualizers/test/test_lidar_points.py @@ -3,7 +3,7 @@ # # SPDX-License-Identifier: BSD-3-Clause -"""World-frame lidar hits drawn by the Newton GL, Viser, and Kit visualizers.""" +"""World-frame lidar hits drawn by the Newton GL and Viser visualizers.""" from __future__ import annotations