Skip to content

[Bug Report] I encountered problems when creating the menu bar tools #4267

@zzzBigWatermelon

Description

@zzzBigWatermelon

I encountered problems when creating the menu bar tools.

Describe the bug

Part of the code is as follows:
When using the omni.kit.actions.core.get_action_registry() method to register actions for button calls, the same code exhibited compatibility issues across different versions of Isaac Sim. Specifically, the code ran correctly in Isaac Sim 4.5, but in Isaac Sim 5.1, the Simulation window did not appear in the menu bar.

Steps to reproduce

` def on_startup(self, ext_id):
'''注册菜单,注册Actions'''

    self.__simulation = Simulation()
    self._observer = None

    # 用于事件流多次回调_on_data_received的数据聚合,暂存碎片数据
    self._accumulated_data = {}

    # actions
    action_registry = omni.kit.actions.core.get_action_registry()
    extension_id = "rapid.Simulation"
    actions_tag = "Simulation Actions"
    # 定义一级菜单的名称
    TOP_MENU_NAME = "Simulation" 

    action_registry.register_action(
        extension_id,
        "simulation_start",
        self._on_start_clicked,
        display_name="Simulation Start",
        description="Start",
        tag=actions_tag,
    )

    action_registry.register_action(
        extension_id,
        "simulation_step",
        lambda: self.__simulation.start(None, None),
        display_name="Simulation Step",
        description="Step",
        tag=actions_tag,
    )

    action_registry.register_action(
        extension_id,
        "simulation_stop",
        lambda: self.__simulation.start(None, None),
        display_name="Simulation Stop",
        description="Stop",
        tag=actions_tag,
    )

    # add menus
    self._menu_list = [
        MenuItemDescription(name="Start",  onclick_action=(extension_id, "simulation_start")),
        MenuItemDescription(name="Step",  onclick_action=(extension_id, "simulation_step")),
        MenuItemDescription(name="Stop",  onclick_action=(extension_id, "simulation_stop"))
        ]
    # self._menu_list = [MenuItemDescription(name="menu", sub_menu=submenu_list)] 这个再创建一个次级菜单
    omni.kit.menu.utils.add_menu_items(self._menu_list, TOP_MENU_NAME)

    # --- 创建布局 ---
    self._layout = [
        MenuLayout.Menu(TOP_MENU_NAME, [
            MenuLayout.Item("Start"),
            MenuLayout.Item("Step"),
            MenuLayout.Item("Stop"),
        ])
    ]
    add_layout(self._layout)

The terminal logs are as follows(in isaac-sim5.1):
2025-12-21 17:24:49 [Info] [omni.replicator.core.scripts.orchestrator] Replicator Start
2025-12-21 17:25:02 [Info] [omni.replicator.core.scripts.orchestrator] Replicator Step
2025-12-21 17:25:02 [Info] [omni.usd] UsdContext::createRunloopThreadForHydraEngineImpl - engine: ' uid: 1024 type: rtx flags: 2 tickRateInHz: 0 deviceMask: 1 creationIndex: 0'
2025-12-21 17:25:02 [Info] [omni.usd] [MBVH]: enableHydraengineMasking: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:02 [Info] [omni.usd] [MBVH]: raytracingMotion/enable: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:02 [Info] [omni.usd] Hydra engine rtx transitioning from async (/app/runLoops/rendering_0) to synchronous rendering
2025-12-21 17:25:02 [Info] [usdrt.population.plugin] USDRT population: Total primvar size: 0.000, sparse primvar size: 0.000
2025-12-21 17:25:02 [Info] [usdrt.population.plugin] FabricPopulation: 0 meshes, 0 materials -> 0 after de-duplication, 0 geo instance proxies
2025-12-21 17:25:02 [Info] [omni.usd] UsdContext::createRunloopThreadForHydraEngineImpl - engine: ' uid: 1024 type: rtx flags: 2 tickRateInHz: 0 deviceMask: 1 creationIndex: 0'
2025-12-21 17:25:02 [Info] [omni.usd] [MBVH]: enableHydraengineMasking: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:02 [Info] [omni.usd] [MBVH]: raytracingMotion/enable: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:02 [Info] [omni.usd] UsdContext::createRunloopThreadForHydraEngineImpl - engine: ' uid: 1024 type: rtx flags: 2 tickRateInHz: 0 deviceMask: 1 creationIndex: 0'
2025-12-21 17:25:02 [Info] [omni.usd] [MBVH]: enableHydraengineMasking: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:02 [Info] [omni.usd] [MBVH]: raytracingMotion/enable: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:02 [Info] [omni.usd] Hydra engine rtx transitioning from async (/app/runLoops/rendering_0) to synchronous rendering
2025-12-21 17:25:02 [Info] [omni.kit.menu.utils.utils] omni.kit.menu.utils.refresh_menu_items Replicator
2025-12-21 17:25:02 [Info] [omni.kit.renderer.plugin] Switch to the same render queue is requested
2025-12-21 17:25:07 [Info] [omni.replicator.core.scripts.orchestrator] Replicator Start
2025-12-21 17:25:07 [Info] [omni.usd] UsdContext::createRunloopThreadForHydraEngineImpl - engine: ' uid: 1024 type: rtx flags: 2 tickRateInHz: 0 deviceMask: 1 creationIndex: 0'
2025-12-21 17:25:07 [Info] [omni.usd] [MBVH]: enableHydraengineMasking: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:07 [Info] [omni.usd] [MBVH]: raytracingMotion/enable: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:07 [Info] [omni.usd] Hydra engine rtx transitioning from async (/app/runLoops/rendering_0) to synchronous rendering
2025-12-21 17:25:07 [Info] [omni.kit.menu.utils.utils] omni.kit.menu.utils.refresh_menu_items Replicator
2025-12-21 17:25:07 [Info] [omni.kit.renderer.plugin] Switch to the same render queue is requested
2025-12-21 17:25:07 [Info] [omni.usd] UsdContext::createRunloopThreadForHydraEngineImpl - engine: ' uid: 1024 type: rtx flags: 2 tickRateInHz: 0 deviceMask: 1 creationIndex: 0'
2025-12-21 17:25:07 [Info] [omni.usd] [MBVH]: enableHydraengineMasking: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:07 [Info] [omni.usd] [MBVH]: raytracingMotion/enable: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:07 [Info] [omni.usd] Hydra engine rtx transitioning from async (/app/runLoops/rendering_0) to synchronous rendering
2025-12-21 17:25:07 [Info] [omni.kit.menu.utils.utils] omni.kit.menu.utils.refresh_menu_items Replicator
2025-12-21 17:25:07 [Info] [omni.kit.renderer.plugin] Switch to the same render queue is requested
2025-12-21 17:25:07 [Info] [omni.kit.menu.utils.utils] omni.kit.menu.utils.refresh_menu_items Replicator
2025-12-21 17:25:07 [Info] [omni.physx.plugin] Physics USD: Physics scene not found. A temporary default PhysicsScene prim was added automatically!
2025-12-21 17:25:07 [Info] [usdrt.population.plugin] USDRT population: Total primvar size: 0.000, sparse primvar size: 0.000
2025-12-21 17:25:07 [Info] [usdrt.population.plugin] FabricPopulation: 0 meshes, 0 materials -> 0 after de-duplication, 0 geo instance proxies
2025-12-21 17:25:07 [Info] [omni.usd] UsdContext::createRunloopThreadForHydraEngineImpl - engine: ' uid: 1024 type: rtx flags: 2 tickRateInHz: 0 deviceMask: 1 creationIndex: 0'
2025-12-21 17:25:07 [Info] [omni.usd] [MBVH]: enableHydraengineMasking: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:07 [Info] [omni.usd] [MBVH]: raytracingMotion/enable: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:07 [Info] [omni.usd] Hydra engine rtx transitioning from async (/app/runLoops/rendering_0) to synchronous rendering
2025-12-21 17:25:07 [Info] [isaacsim.core.simulation_manager.plugin] onResume: Stored initial time data
2025-12-21 17:25:07 [Info] [omni.physx.plugin] Using CUDA device ordinal 0.
2025-12-21 17:25:07 [Info] [omni.kit.renderer.plugin] Switch to the same render queue is requested
2025-12-21 17:25:12 [Info] [isaacsim.core.simulation_manager.plugin] onStop: Cleared time samples
2025-12-21 17:25:12 [Info] [omni.physx.plugin] Using CUDA device ordinal 0.
2025-12-21 17:25:12 [Info] [omni.usd.audio] resetting the animation timeline
2025-12-21 17:25:12 [Info] [omni.kit.menu.utils.utils] omni.kit.menu.utils.refresh_menu_items Replicator
2025-12-21 17:25:12 [Info] [omni.usd] Status (secondary thread): in _OpenAsset at line 360 of C:\g\181840452\source\library\OmniUsdResolver_Ar2.cpp -- OmniUsdResolver: Opening filesystem asset 'E:/downloads/isaac-sim-standalone-5.1.0/kit/resources/icons/lights/rect_light.png' for read
2025-12-21 17:25:12 [Info] [omni.usd]
2025-12-21 17:25:12 [Info] [omni.usd] Status (secondary thread): in _OpenAsset at line 360 of C:\g\181840452\source\library\OmniUsdResolver_Ar2.cpp -- OmniUsdResolver: Opening filesystem asset 'E:/downloads/isaac-sim-standalone-5.1.0/kit/resources/icons/lights/sphere_light.png' for read
2025-12-21 17:25:12 [Info] [omni.usd]
2025-12-21 17:25:12 [Info] [omni.usd] Status (secondary thread): in _OpenAsset at line 360 of C:\g\181840452\source\library\OmniUsdResolver_Ar2.cpp -- OmniUsdResolver: Opening filesystem asset 'E:/downloads/isaac-sim-standalone-5.1.0/kit/resources/icons/lights/distant_light.png' for read
2025-12-21 17:25:12 [Info] [omni.usd]
2025-12-21 17:25:12 [Info] [omni.usd] Status (secondary thread): in _OpenAsset at line 360 of C:\g\181840452\source\library\OmniUsdResolver_Ar2.cpp -- OmniUsdResolver: Opening filesystem asset 'E:/downloads/isaac-sim-standalone-5.1.0/kit/resources/icons/lights/disk_light.png' for read
2025-12-21 17:25:12 [Info] [omni.usd]
2025-12-21 17:25:12 [Info] [omni.usd] Status (secondary thread): in _OpenAsset at line 360 of C:\g\181840452\source\library\OmniUsdResolver_Ar2.cpp -- OmniUsdResolver: Opening filesystem asset 'E:/downloads/isaac-sim-standalone-5.1.0/kit/resources/icons/lights/cylinder_light.png' for read
2025-12-21 17:25:12 [Info] [omni.usd]
2025-12-21 17:25:12 [Info] [omni.usd] Status (secondary thread): in _OpenAsset at line 360 of C:\g\181840452\source\library\OmniUsdResolver_Ar2.cpp -- OmniUsdResolver: Opening filesystem asset 'E:/downloads/isaac-sim-standalone-5.1.0/kit/resources/icons/lights/dome_light.png' for read
2025-12-21 17:25:12 [Info] [omni.usd]
2025-12-21 17:25:12 [Info] [omni.usd] Status (secondary thread): in _OpenAsset at line 360 of C:\g\181840452\source\library\OmniUsdResolver_Ar2.cpp -- OmniUsdResolver: Opening filesystem asset 'E:/downloads/isaac-sim-standalone-5.1.0/kit/resources/icons/sounds/sound.png' for read
2025-12-21 17:25:12 [Info] [omni.usd]
2025-12-21 17:25:12 [Info] [omni.usd] Status (secondary thread): in _OpenAsset at line 360 of C:\g\181840452\source\library\OmniUsdResolver_Ar2.cpp -- OmniUsdResolver: Opening filesystem asset 'E:/downloads/isaac-sim-standalone-5.1.0/kit/resources/icons/sounds/listener.png' for read
2025-12-21 17:25:12 [Info] [omni.usd]
2025-12-21 17:25:12 [Info] [omni.kit.menu.utils.utils] omni.kit.menu.utils.refresh_menu_items Replicator
2025-12-21 17:25:12 [Info] [omni.usd] UsdContext::createRunloopThreadForHydraEngineImpl - engine: ' uid: 1024 type: rtx flags: 2 tickRateInHz: 0 deviceMask: 1 creationIndex: 0'
2025-12-21 17:25:12 [Info] [omni.usd] [MBVH]: enableHydraengineMasking: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:12 [Info] [omni.usd] [MBVH]: raytracingMotion/enable: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:12 [Info] [omni.usd] UsdContext::createRunloopThreadForHydraEngineImpl - engine: ' uid: 1024 type: rtx flags: 2 tickRateInHz: 0 deviceMask: 1 creationIndex: 0'
2025-12-21 17:25:12 [Info] [omni.usd] [MBVH]: enableHydraengineMasking: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:12 [Info] [omni.usd] [MBVH]: raytracingMotion/enable: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:12 [Info] [omni.kit.renderer.plugin] Switch to the same render queue is requested
2025-12-21 17:25:12 [Info] [omni.usd] UsdContext::createRunloopThreadForHydraEngineImpl - engine: ' uid: 1024 type: rtx flags: 2 tickRateInHz: 0 deviceMask: 1 creationIndex: 0'
2025-12-21 17:25:12 [Info] [omni.usd] [MBVH]: enableHydraengineMasking: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:12 [Info] [omni.usd] [MBVH]: raytracingMotion/enable: OFF, for indexForEngineInstance: 0
2025-12-21 17:25:12 [Info] [omni.kit.renderer.plugin] Switch to the same render queue is requested

No errors were reported.

For more information on this, check: https://www.markdownguide.org/extended-syntax/#fenced-code-blocks

-->

System Info

Describe the characteristic of your environment:

|---------------------------------------------------------------------------------------------|
| Driver Version: 581.57 | Graphics API: Vulkan
|=============================================================================================|
| GPU | Name | Active | LDA | GPU Memory | Vendor-ID | LUID |
| | | | | | Device-ID | UUID |
| | | | | | Bus-ID | |
|---------------------------------------------------------------------------------------------|
| 0 | NVIDIA GeForce RTX 3070 Ti Lap.. | Yes: 0 | | 8018 MB | 10de | 3d020100.. |
| | | | | | 24a0 | c20a02e6.. |
| | | | | | 1 | |
|=============================================================================================|
| OS: Windows 11 Pro, Version: 10.0 (24H2), Build: 26100, Kernel: 10.0.26100.7309
| Processor: 12th Gen Intel(R) Core(TM) i7-12700H
| Cores: 14 | Logical Cores: 20
|---------------------------------------------------------------------------------------------|
| Total Memory (MB): 32508 | Free Memory: 18540
| Total Page/Swap (MB): 34655 | Free Page/Swap: 14329
|---------------------------------------------------------------------------------------------|

Checklist

  • I have checked that there is no similar issue in the repo (required)
  • I have checked that the issue is not in running Isaac Sim itself and is related to the repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions