Skip to content

Commit fe6ee74

Browse files
authored
Fixes broken import in Live Visualizer image plot (#2486)
# Description Fixes isaacsim import in the image plot function of the live visualizers. ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
1 parent e992592 commit fe6ee74

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

source/isaaclab/isaaclab/ui/widgets/image_plot.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,18 @@
44
# SPDX-License-Identifier: BSD-3-Clause
55

66
import numpy as np
7+
from contextlib import suppress
78
from matplotlib import cm
89
from typing import TYPE_CHECKING, Optional
910

1011
import carb
1112
import omni
1213
import omni.log
1314

15+
with suppress(ImportError):
16+
# isaacsim.gui is not available when running in headless mode.
17+
import isaacsim.gui.components.ui_utils
18+
1419
from .ui_widget_wrapper import UIWidgetWrapper
1520

1621
if TYPE_CHECKING:

0 commit comments

Comments
 (0)