Keyboard shortcut to reset simulation

I don’t seem to find any keyboard shortcut to reset the simulation. Space bar can be used to Start and Pause the simulation, but there seems to be missing a shortcut to reset the simulation. Or is that just me?

Could you check whether extscache/omni.kit.widget.toolbar-2.0.1+69cbf6ad/omni/kit/widget/toolbar/builtin_tools/play_button_group.py is helpful for implementing or discovering a reset-simulation shortcut?

Thanks a lot. I was able to implement the association of a CTRL+Space hotkey to Stop the simulation.

For anyone interested in this feature you should add the following piece of code just before the return statement of the create() function in extscache/omni.kit.widget.toolbar-2.0.1+69cbf6ad/omni/kit/widget/toolbar/builtin_tools/play_button_group.py

    # Assign Stop button Hotkey
    if self._stop_hotkey:
        self._stop_hotkey.clean()
    self._stop_hotkey = Hotkey(
        "toolbar::stop",
        Key.SPACE,
        lambda: on_stop_clicked(),
        lambda: self._stop_button is not None and self._stop_button.enabled and self._is_in_context(),
        carb.input.KEYBOARD_MODIFIER_FLAG_CONTROL
    )

And then add the following section after self._stop_button = None in the __init__ function:

        self._stop_hotkey = None

And finally add this section under self._play_hotkey = None in the clean(self) function:

        if self._stop_hotkey:
            self._stop_hotkey.clean()
            self._stop_hotkey = None

I would be happy to open a PR for this, but this particular piece of code is not a part of the Open Source Isaac Sim repo but is rather a part of the Omniverse engine. Right?

1 Like

Yes, that code lives in an Omniverse Kit/engine extension, not in the open-source Isaac Sim repo.

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