1111import logging
1212import signal
1313import warnings
14- from typing import TYPE_CHECKING , Any , ClassVar
14+ from typing import TYPE_CHECKING , ClassVar
1515
1616import numpy as np
1717import torch
2727from isaaclab .visualizers .visualizer_cfg import PerspectiveCameraCfg
2828
2929from 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
3232from .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 :
0 commit comments