-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Adds different render modes to IsaacEnv
#63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a4c346c to
0f15911
Compare
f1ca2f9 to
5117a3c
Compare
Contributor
Author
|
Currently this PR is generating the following error which needs to be fixed before merging it. The issue is something to do with the enabled extensions. Here's the minimal repro: import os
from omni.isaac.kit import SimulationApp
# launch omniverse app
app_experience = f"{os.environ['EXP_PATH']}/omni.isaac.sim.python.gym.headless.render.kit"
config = {"headless": True}
simulation_app = SimulationApp(config, experience=app_experience)
import omni.isaac.core.utils.prims as prim_utils
from omni.isaac.core.simulation_context import SimulationContext
from omni.isaac.core.utils.viewports import set_camera_view
from omni.isaac.core.world import World
def main():
"""Spawns lights in the stage and sets the camera view."""
# Load kit helper
sim = World(physics_dt=0.01, rendering_dt=0.01, backend="torch")
# Set main camera
set_camera_view([2.5, 2.5, 2.5], [0.0, 0.0, 0.0])
# Spawn things into stage
# Lights-1
prim_utils.create_prim(
"/World/Light/GreySphere",
"SphereLight",
translation=(4.5, 3.5, 10.0),
attributes={"radius": 2.5, "intensity": 600.0, "color": (0.75, 0.75, 0.75)},
)
# Lights-2
prim_utils.create_prim(
"/World/Light/WhiteSphere",
"SphereLight",
translation=(-4.5, 3.5, 10.0),
attributes={"radius": 2.5, "intensity": 600.0, "color": (1.0, 1.0, 1.0)},
)
# Play the simulator
sim.reset()
# Now we are ready!
print("[INFO]: Setup complete...")
# Simulate physics
while simulation_app.is_running():
# If simulation is stopped, then exit.
if sim.is_stopped():
break
# If simulation is paused, then skip.
if not sim.is_playing():
sim.step(render=not simulation_app.config["headless"])
continue
# perform step
sim.step()
if __name__ == "__main__":
# Run empty stage
main()
# Close the simulator
simulation_app.close() |
1 task
Signed-off-by: Mayank Mittal <[email protected]>
166f83f to
b6e571d
Compare
pascal-roth
added a commit
that referenced
this pull request
Aug 18, 2025
Change Mulit-mesh raycaster and raycaster camera to own files, restore the ones of main to simplify the merge. NOTE: test of the camera is currently failing, similar as on public main at that time, should be fixed after update to latest main - Breaking change (fix or feature that would cause existing functionality to not work as expected) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR updates the
IsaacEnvclass to support different rendering modes (as suggested by OpenAI Gym documentation). This allows users to also record videos using the environment by using thegym.wrapper.RecordVideowrapper.To enable rendering of the viewport, the user needs to set
viewport=Truewhile initializing the environment. This flag will enable extensions required to create the renderer. It is to note that enabling the viewport will lead to a certain performance drop.As an example of creating the environment while running headless but enabling the rendering:
Additionally, all workflows
train.pyhave been updated to take the command line argumentvideothat performs the above wrapping and saves videos into the experiment logging directory.Fixes OIGE #17
Type of change
Screenshots
Running the above command will generate a video similar to the follows. The resolution of the image can be changed through the
IsaacEnvCfg.ViewerCfg.resolution. By default it is 1280 x 720.rl-video-step-1500.mp4
Checklist
pre-commitchecks with./orbit.sh --formatconfig/extension.tomlfile