|
13 | 13 | from contextlib import contextmanager |
14 | 14 | from typing import Any |
15 | 15 |
|
| 16 | +from isaaclab.app.settings_manager import get_settings_manager |
16 | 17 | from isaaclab.physics.physics_manager_cfg import PhysicsCfg |
17 | 18 | from isaaclab.renderers.renderer_cfg import RendererCfg |
18 | 19 | from isaaclab.sensors.camera.camera_cfg import CameraCfg |
@@ -320,22 +321,20 @@ def launch_simulation( |
320 | 321 | # loading both in the same process causes a dynamic-linker crash. Use |
321 | 322 | # --visualizer newton instead, which is compatible with ovrtx presets. |
322 | 323 | early_visualizer_types = _get_visualizer_types(launcher_args) |
323 | | - if "kit" in early_visualizer_types: |
324 | | - has_ovrtx = _scan_config( |
325 | | - env_cfg, [lambda node: isinstance(node, RendererCfg) and getattr(node, "renderer_type", None) == "ovrtx"] |
326 | | - )[0] |
327 | | - if has_ovrtx: |
328 | | - raise ValueError( |
329 | | - "[launch_simulation] '--visualizer kit' is incompatible with 'ovrtx_renderer'. " |
330 | | - "Both Kit (Isaac Sim) and ovrtx ship conflicting RTX hydra libraries " |
331 | | - "(librtx.hydra.so, liblegacy.hydra.so) compiled against different USD namespaces, " |
332 | | - "which causes a dynamic-linker crash when loaded into the same process. " |
333 | | - "Use '--visualizer newton' instead, which is fully compatible with ovrtx presets." |
334 | | - ) |
| 324 | + has_ovrtx_renderer = _scan_config(env_cfg, [_is_ovrtx_renderer])[0] |
| 325 | + if "kit" in early_visualizer_types and has_ovrtx_renderer: |
| 326 | + raise ValueError( |
| 327 | + "[launch_simulation] '--visualizer kit' is incompatible with 'ovrtx_renderer'. " |
| 328 | + "Both Kit (Isaac Sim) and ovrtx ship conflicting RTX hydra libraries " |
| 329 | + "(librtx.hydra.so, liblegacy.hydra.so) compiled against different USD namespaces, " |
| 330 | + "which causes a dynamic-linker crash when loaded into the same process. " |
| 331 | + "Use '--visualizer newton' instead, which is fully compatible with ovrtx presets." |
| 332 | + ) |
335 | 333 |
|
336 | 334 | validate_runtime_compatibility(env_cfg, launcher_args) |
337 | 335 | needs_kit, has_kit_cameras, visualizer_types = compute_kit_requirements(env_cfg, launcher_args) |
338 | 336 | visualizer_intent = _compute_visualizer_intent(env_cfg) |
| 337 | + has_kit_visualizer = "kit" in visualizer_types or visualizer_intent.get("has_kit_visualizer", False) |
339 | 338 | _set_visualizer_intent_on_launcher_args(launcher_args, visualizer_intent) |
340 | 339 |
|
341 | 340 | if needs_kit and has_kit_cameras: |
@@ -421,7 +420,14 @@ def launch_simulation( |
421 | 420 | if sim_cfg is not None and hasattr(app_launcher, "device"): |
422 | 421 | sim_cfg.device = app_launcher.device |
423 | 422 | close_fn = app_launcher.app.close |
424 | | - elif visualizer_types or visualizer_explicit_none: |
| 423 | + |
| 424 | + settings = get_settings_manager() |
| 425 | + settings.set_bool("/isaaclab/runtime/needs_kit", bool(needs_kit)) |
| 426 | + settings.set_bool("/isaaclab/runtime/has_kit_cameras", bool(has_kit_cameras)) |
| 427 | + settings.set_bool("/isaaclab/runtime/has_kit_visualizer", bool(has_kit_visualizer)) |
| 428 | + settings.set_bool("/isaaclab/runtime/has_ovrtx_renderer", bool(has_ovrtx_renderer)) |
| 429 | + |
| 430 | + if not needs_kit and (visualizer_types or visualizer_explicit_none): |
425 | 431 | # Newton path without Kit: AppLauncher is skipped, so manually store the visualizer |
426 | 432 | # selection in SettingsManager (works in standalone mode via plain dict) so that |
427 | 433 | # SimulationContext._get_cli_visualizer_types() can find it. |
|
0 commit comments