isaaclab.ui.widgets#
Classes#
The following classes are part of the public isaaclab.ui.widgets API.
An image plot widget to display live data. |
|
A 2D line plot widget to display live data. |
|
A interface object used to transfer data from a manager to a UI widget. |
|
Base Class for components that support debug visualizations that requires access to some UI elements. |
- class isaaclab.ui.widgets.ImagePlot[source]#
Bases:
UIWidgetWrapperAn image plot widget to display live data.
The mode frame in the following layout is only useful for depth images:
+-------------------------------------------------------+ | containing_frame | |+-----------------------------------------------------+| | main_plot_frame | ||+---------------------------------------------------+|| ||| plot_frames ||| ||| ||| ||| (Image Plot Data) ||| ||| ||| |||+-------------------------------------------------+||| ||| mode_frame ||| ||| [Dropdown: Mode Selection] ||| ||| [Collapsible: Manual Normalization Options] ||| ||+---------------------------------------------------+|| |+-----------------------------------------------------+| +-------------------------------------------------------+
Methods:
__init__([image, label, widget_height, ...])Create an XY plot UI Widget with axis scaling, legends, and support for multiple plots.
__new__(*args, **kwargs)- __init__(image: ndarray | None = None, label: str = '', widget_height: int = 200, min_value: float = 0.0, max_value: float = 1.0)[source]#
Create an XY plot UI Widget with axis scaling, legends, and support for multiple plots.
Overlapping data is most accurately plotted when centered in the frame with reasonable axis scaling. Pressing down the mouse gives the x and y values of each function at an x coordinate.
- Parameters:
- classmethod __new__(*args, **kwargs)#
- class isaaclab.ui.widgets.LiveLinePlot[source]#
Bases:
UIWidgetWrapperA 2D line plot widget to display live data.
This widget is used to display live data in a 2D line plot. It can be used to display multiple series in the same plot.
The widget uses the following layout:
+-------------------------------------------------------+ | containing_frame | |+-----------------------------------------------------+| | main_plot_frame | ||+---------------------------------------------------+|| ||| plot_frames + grid lines (Z_stacked) ||| ||| (Live Plot Data) ||| |||+-------------------------------------------------+||| ||| legends_frame ||| ||| [x][Series 1] [x][Series 2] [ ][Series 3] ||| |||+-------------------------------------------------+||| ||| limits_frame ||| ||| [Y-Limits] [min] [max] [Autoscale] ||| |||+-------------------------------------------------+||| ||| filter_frame ||| |+-----------------------------------------------------+| +-------------------------------------------------------+
Methods:
- __init__(y_data: list[list[float]], y_min: float = -10, y_max: float = 10, plot_height: int = 150, show_legend: bool = True, legends: list[str] | None = None, max_datapoints: int = 200)[source]#
Create a new LiveLinePlot widget.
- Parameters:
y_data¶ – A list of lists of floats containing the data to plot. Each list of floats represents a series in the plot.
y_min¶ – The minimum y value to display. Defaults to -10.
y_max¶ – The maximum y value to display. Defaults to 10.
plot_height¶ – The height of the plot in pixels. Defaults to 150.
show_legend¶ – Whether to display the legend. Defaults to True.
legends¶ – A list of strings containing the legend labels for each series. If None, the default labels are “Series_0”, “Series_1”, etc. Defaults to None.
max_datapoints¶ – The maximum number of data points to display. If the number of data points exceeds this value, the oldest data points are removed. Defaults to 200.
- classmethod __new__(*args, **kwargs)#
- class isaaclab.ui.widgets.ManagerLiveVisualizer[source]#
Bases:
UiVisualizerBaseA interface object used to transfer data from a manager to a UI widget.
This class handles the creation of UI Widgets for selected terms given a
ManagerLiveVisualizerCfg. It iterates through the terms of the manager and creates a visualizer for each term. If the term is a single variable or a multi-variable signal, it creates aLiveLinePlot. If the term is an image (2D or RGB), it creates anImagePlot. The visualizer can be toggled on and off using theManagerLiveVisualizerCfg.debug_visflag in the configuration.Methods:
- __init__(manager: ~isaaclab.managers.manager_base.ManagerBase, cfg: ~isaaclab.ui.widgets.manager_live_visualizer.ManagerLiveVisualizerCfg = ManagerLiveVisualizerCfg(debug_vis=False, manager_name=<dataclasses._MISSING_TYPE object>, term_names=None))[source]#
Initialize ManagerLiveVisualizer.
- classmethod __new__(*args, **kwargs)#
- class isaaclab.ui.widgets.UiVisualizerBase[source]#
Bases:
objectBase Class for components that support debug visualizations that requires access to some UI elements.
This class provides a set of functions that can be used to assign ui interfaces.
The following functions are provided:
set_debug_vis(): Assigns a debug visualization interface. This function is called by the main UIwhen the checkbox for debug visualization is toggled.
set_vis_frame(): Assigns a small frame within the isaac lab tab that can be used to visualize debuginformation. Such as e.g. plots or images. It is called by the main UI on startup to create the frame.
set_window(): Assigngs the main window that is used by the main UI. This allows the userto have full controller over all UI elements. But be warned, with great power comes great responsibility.
Methods:
- classmethod __new__(*args, **kwargs)#
- __init__()#