Unverified Commit d58259af authored by AutonomousHansen's avatar AutonomousHansen Committed by GitHub

Fix crash caused by omni.kit.widget.toolbar import (#297)

In `AppLauncher`, added self._livestream >= 1 to the list of conditions
which can cause omni.kit.widget.toolbar to be loaded, as this extension
is loaded later based in AppLauncher startup to remove the 'stop'
button, and this will cause a crash if not omni.kit.widget.toolbar is
not already loaded.

This is reproducible by using any 'experience' without toolbar enabled
while having LIVESTREAM=1. An example is the `--headless` execution in
our 'Training with an RL Agent' tutorial:
`./orbit.sh -p source/standalone/workflows/sb3/train.py --task
Isaac-Cartpole-v0 --num_envs 64 --headless`

## Type of change

<!-- As you go through the list, delete the ones that are not
applicable. -->

- Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./orbit.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
- [x] 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

<!--
As you go through the checklist above, you can mark something as done by
putting an x character in it

For example,
- [x] I have done this task
- [ ] I have not done this task
-->

---------
Signed-off-by: 's avatarAutonomousHansen <50837800+AutonomousHansen@users.noreply.github.com>
Co-authored-by: 's avatarjsmith-bdai <142246516+jsmith-bdai@users.noreply.github.com>
Co-authored-by: 's avatarMayank Mittal <12863862+Mayankm96@users.noreply.github.com>
parent 8f0a43ff
[package]
# Note: Semantic Versioning is used: https://semver.org/
version = "0.10.3"
version = "0.10.4"
# Description
title = "ORBIT framework for Robot Learning"
......
Changelog
---------
0.10.4 (2023-12-14)
~~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
* Fixed potentially breaking import of omni.kit.widget.toolbar by ensuring that
if live-stream is enabled, then the :mod:`omni.kit.widget.toolbar`
extension is loaded.
0.10.3 (2023-12-12)
~~~~~~~~~~~~~~~~~~~
......
......@@ -625,12 +625,14 @@ class AppLauncher:
carb_settings_iface.set_bool("/orbit/offscreen_render/enabled", self._offscreen_render)
# enable extensions for off-screen rendering
# note: depending on the app file, some extensions might not be available in it.
# Thus, we manually enable these extensions to make sure they are available.
if self._offscreen_render or not self._headless:
# note: enabling extensions is order-sensitive. please do not change the order!
# Depending on the app file, some extensions might not be available in it.
# Thus, we manually enable these extensions to make sure they are available.
# note: enabling extensions is order-sensitive. please do not change the order!
if self._offscreen_render or not self._headless or self._livestream >= 1:
# extension to enable UI buttons (otherwise we get attribute errors)
enable_extension("omni.kit.window.toolbar")
if self._offscreen_render or not self._headless:
# extension to make RTX realtime and path-traced renderers
enable_extension("omni.kit.viewport.rtx")
# extension to make HydraDelegate renderers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment