Question about making own extension

Hello. I am trying to create my own extension in Isaac Sim 2023.1.1 version.

However, when I downloaded and used the template provided by Isaac Sim, I saw the ui_builder.py file, which is composed of classes such as Button and CheckBox in omni.isaac.ui.element_wrappers.

When I looked at several extension examples, I wanted to design my extension using multiple buttons using multi_cb_builder in omni.isaac.ui.ui_utils, but an error occurs in the extension when I use this code.

Is there an example that I can use to start my extension like multi_cb_builder?

The code below is my code, and the UI looks strange when I use this code.

def _create_evaluation_setup_fields_frame(self):
        self._evaluation_fields_frame = CollapsableFrame(title="Evaluation Setup", collapsed=False, enabled=True, visible=True, build_fn=None)
        with self._evaluation_fields_frame:
            with ui.VStack(style=get_style(), spacing=10, height=0):
                ### Import Environments ###
                def dropdown_populate_fn():
                    return ["default_environment", "gridroom_black", "gridroom_curved", 
                            "simple_room", "warehouse", 
                            "warehouse_with_forklifts", "warehouse_multiple_shelves", 
                            "full_warehouse", "hospital", "office", "jetracer_track_solid"]

                dropdown = DropDown(
                    "Import Environment",
                    tooltip="Select an option from the DropDown",
                    populate_fn=dropdown_populate_fn,
                    on_selection_fn=self._on_dropdown_item_selection,
                )
                self.wrapped_ui_elements.append(dropdown)

                dropdown.repopulate()  # This does not happen automatically, and it triggers the on_selection_fn
                
                ### Import Assets ###
                def dropdown_populate_fn():
                    return ["Box", "Cube", "ycb_object", "nuts", "human"]

                dropdown = DropDown(
                    "Import Assets",
                    tooltip="Select an option from the DropDown",
                    populate_fn=dropdown_populate_fn,
                    on_selection_fn=self._on_dropdown_item_selection,
                )
                self.wrapped_ui_elements.append(dropdown)

                dropdown.repopulate()  # This does not happen automatically, and it triggers the on_selection_fn
                
                with ui.HStack(style=get_style(), spacing=5, height=0):
                    button = ResetButton(
                        label="Reset Position",
                        text="RESET",
                        # pre_reset_fn(),
                    )
                    
                    self.wrapped_ui_elements.append(button)

@brunoleej i am just another user and cannot provide a direct answer to your question. that said, i wonder if you’ve already looked at the omni.isaac.ui_template extension? if you were to go into Window > Extension Manager and search for omni.isaac.ui, it should show up:

image

and it should give you all sorts of ui element classes to play around with and show how they’re implemented:

alternatively, the file can be found in…

  • Windows - %localappdata%\ov\pkg\isaac_sim-2023.1.1\exts\omni.isaac.ui_template\omni\isaac\ui_template\extension.py
  • Linux - ~/.local/share/ov/pkg/isaac_sim-2023.1.1/exts/omni.isaac.ui_template/omni/isaac/ui_template/extension.py

and here’s the API for multi_cb_builder if you haven’t checked it out yet -
UI Utilities [omni.isaac.ui] — isaac_sim 2023.1.1-rc.8 documentation (nvidia.com)

here’s an even broader topic regarding building an extension for just in case -
3.1. Isaac Sim Extension Templates — Omniverse IsaacSim latest documentation (nvidia.com)

1 Like

I really appreciate your help.

Thank you for your assistance. I’ll definitely refer to this example, as you suggested!!!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.