Unverified Commit ca82e2ce authored by Mayank Mittal's avatar Mayank Mittal Committed by GitHub

Adds render mode toggling in IsaacEnv (#89)

# Description

So far we have only been able to run the training script in headless
mode. However, this has posed limitations in our workflows since we
always want to check the policy in between the training iterations and
not just at the end.

This MR creates a simple UI that allows toggling between full rendering
and no rendering.
* In full-rendering, the environment is rendered at every `env.step()`
call, i.e. it happens at the environment frequency (not the physics dt
or rendering dt).
* In no-rendering, the environment rendering is disabled. However, we
still throttle the UI at every five environment steps to still allow UI
interactions (otherwise keyboard and mouse interactions get blocked).

Additionally, the MR fixes the behavior of UI interactions when hitting
the pause/stop buttons:
* When paused: the environment blocks itself and waits for play to
happen.
* When stopped: the environment closes itself and shutdowns the
simulation app, instead of just throwing an error.

However, there is no free cost here. Running with the GUI still causes
some slowdowns. For training `Isaac-Ant-v0` with RL-Games, the following
numbers are obtained:
* headless: ~170,000 FPS (sim), ~98,000 FPS (total)
* UI with no-rendering: ~150,000 FPS (sim), 88,000 FPS (total)
* UI with full-rendering: ~40,000 FPS (sim), 25,000 FPS (total)

## Type of change

- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing
functionality to not work as expected)

## Screenshots

https://github.com/isaac-orbit/orbit/assets/12863862/2bc61fdc-c392-43ed-bbd5-12c743ca3150

## 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
parent 5232b449
...@@ -88,4 +88,4 @@ reportPrivateUsage = "warning" ...@@ -88,4 +88,4 @@ reportPrivateUsage = "warning"
skip = '*.usd,*.svg,*.png,_isaac_sim*,*.bib,*.css,*/_build' skip = '*.usd,*.svg,*.png,_isaac_sim*,*.bib,*.css,*/_build'
quiet-level = 0 quiet-level = 0
# the world list should always have words in lower case # the world list should always have words in lower case
ignore-words-list = "haa,slq" ignore-words-list = "haa,slq,collapsable"
[package] [package]
# Note: Semantic Versioning is used: https://semver.org/ # Note: Semantic Versioning is used: https://semver.org/
version = "0.3.0" version = "0.3.2"
# Description # Description
title = "ORBIT Environments" title = "ORBIT Environments"
......
Changelog Changelog
--------- ---------
0.3.2 (2023-07-22)
~~~~~~~~~~~~~~~~~~
Added
^^^^^^^
* Added a UI to the :class:`IsaacEnv` class to enable/disable rendering of the viewport when not running in
headless mode.
Fixed
^^^^^
* Fixed the the issue with environment returning transition tuples even when the simulation is paused.
* Fixed the shutdown of the simulation when the environment is closed.
0.3.1 (2023-06-23) 0.3.1 (2023-06-23)
~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
......
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