Skip to content

Commit

Permalink
IsaacSim 2023.1.0 compatibility fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cremebrule committed Oct 27, 2023
1 parent 0da2389 commit 3b166f5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions omnigibson/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ def create_app():
config_kwargs["active_gpu"] = gpu_id
config_kwargs["physics_gpu"] = gpu_id
app = SimulationApp(config_kwargs)

# Omni overrides the global logger to be DEBUG, which is very annoying, so we re-override it to the default WARN
# TODO: Remove this once omniverse fixes it
logging.getLogger().setLevel(logging.WARNING)

import omni

# Enable additional extensions we need
Expand Down
4 changes: 2 additions & 2 deletions omnigibson/objects/light_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def radius(self):
Returns:
float: radius for this light
"""
return self._light_link.get_attribute("radius")
return self._light_link.get_attribute("inputs:radius" if meets_minimum_isaac_version("2023.0.0") else "radius")

@radius.setter
def radius(self, radius):
Expand All @@ -171,7 +171,7 @@ def radius(self, radius):
Args:
radius (float): radius to set
"""
self._light_link.set_attribute("radius", radius)
self._light_link.set_attribute("inputs:radius" if meets_minimum_isaac_version("2023.0.0") else "radius", radius)

@property
def intensity(self):
Expand Down
5 changes: 5 additions & 0 deletions omnigibson/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,11 @@ def _open_new_stage(self):
with suppress_omni_log(None):
create_new_stage()

# Clear physics context
self._physics_context = None
if meets_minimum_isaac_version("2023.0.0"):
self._physx_fabric_interface = None

# Create world prim
self.stage.DefinePrim("/World", "Xform")

Expand Down

0 comments on commit 3b166f5

Please sign in to comment.