diff --git a/source/extensions/omni.isaac.orbit/config/extension.toml b/source/extensions/omni.isaac.orbit/config/extension.toml index 346bf80186..58bfe4343d 100644 --- a/source/extensions/omni.isaac.orbit/config/extension.toml +++ b/source/extensions/omni.isaac.orbit/config/extension.toml @@ -1,7 +1,7 @@ [package] # Note: Semantic Versioning is used: https://semver.org/ -version = "0.9.42" +version = "0.9.43" # Description title = "ORBIT framework for Robot Learning" diff --git a/source/extensions/omni.isaac.orbit/docs/CHANGELOG.rst b/source/extensions/omni.isaac.orbit/docs/CHANGELOG.rst index 5571e195f7..37ee69f33c 100644 --- a/source/extensions/omni.isaac.orbit/docs/CHANGELOG.rst +++ b/source/extensions/omni.isaac.orbit/docs/CHANGELOG.rst @@ -1,6 +1,18 @@ Changelog --------- +0.9.43 (2023-11-16) +~~~~~~~~~~~~~~~~~~~ + +Fixed +^^^^^ + +* Replaced subscription of physics play and stop events in the :class:`omni.isaac.orbit.assets.AssetBase` and + :class:`omni.isaac.orbit.sensors.SensorBase` classes with subscription to time-line play and stop events. + This is to prevent issues in cases where physics first needs to perform mesh cooking and handles are not + available immediately. For instance, with deformable meshes. + + 0.9.42 (2023-11-16) ~~~~~~~~~~~~~~~~~~~ diff --git a/source/extensions/omni.isaac.orbit/omni/isaac/orbit/assets/asset_base.py b/source/extensions/omni.isaac.orbit/omni/isaac/orbit/assets/asset_base.py index df81d30e16..704b9757a7 100644 --- a/source/extensions/omni.isaac.orbit/omni/isaac/orbit/assets/asset_base.py +++ b/source/extensions/omni.isaac.orbit/omni/isaac/orbit/assets/asset_base.py @@ -13,7 +13,7 @@ import omni.isaac.core.utils.prims as prim_utils import omni.kit.app -import omni.physx +import omni.timeline if TYPE_CHECKING: from .asset_base_cfg import AssetBaseCfg @@ -58,14 +58,14 @@ def __init__(self, cfg: AssetBaseCfg): # note: Use weakref on all callbacks to ensure that this object can be deleted when its destructor is called. # add callbacks for stage play/stop # The order is set to 10 which is arbitrary but should be lower priority than the default order of 0 - physx_event_stream = omni.physx.acquire_physx_interface().get_simulation_event_stream_v2() - self._initialize_handle = physx_event_stream.create_subscription_to_pop_by_type( - int(omni.physx.bindings._physx.SimulationEvent.RESUMED), + timeline_event_stream = omni.timeline.get_timeline_interface().get_timeline_event_stream() + self._initialize_handle = timeline_event_stream.create_subscription_to_pop_by_type( + int(omni.timeline.TimelineEventType.PLAY), lambda event, obj=weakref.proxy(self): obj._initialize_callback(event), order=10, ) - self._invalidate_initialize_handle = physx_event_stream.create_subscription_to_pop_by_type( - int(omni.physx.bindings._physx.SimulationEvent.STOPPED), + self._invalidate_initialize_handle = timeline_event_stream.create_subscription_to_pop_by_type( + int(omni.timeline.TimelineEventType.STOP), lambda event, obj=weakref.proxy(self): obj._invalidate_initialize_callback(event), order=10, ) diff --git a/source/extensions/omni.isaac.orbit/omni/isaac/orbit/sensors/sensor_base.py b/source/extensions/omni.isaac.orbit/omni/isaac/orbit/sensors/sensor_base.py index 8d467ce913..2c658c53b3 100644 --- a/source/extensions/omni.isaac.orbit/omni/isaac/orbit/sensors/sensor_base.py +++ b/source/extensions/omni.isaac.orbit/omni/isaac/orbit/sensors/sensor_base.py @@ -19,7 +19,7 @@ import omni.isaac.core.utils.prims as prim_utils import omni.kit.app -import omni.physx +import omni.timeline from omni.isaac.core.simulation_context import SimulationContext if TYPE_CHECKING: @@ -55,14 +55,14 @@ def __init__(self, cfg: SensorBaseCfg): # note: Use weakref on callbacks to ensure that this object can be deleted when its destructor is called. # add callbacks for stage play/stop # The order is set to 10 which is arbitrary but should be lower priority than the default order of 0 - physx_event_stream = omni.physx.acquire_physx_interface().get_simulation_event_stream_v2() - self._initialize_handle = physx_event_stream.create_subscription_to_pop_by_type( - int(omni.physx.bindings._physx.SimulationEvent.RESUMED), + timeline_event_stream = omni.timeline.get_timeline_interface().get_timeline_event_stream() + self._initialize_handle = timeline_event_stream.create_subscription_to_pop_by_type( + int(omni.timeline.TimelineEventType.PLAY), lambda event, obj=weakref.proxy(self): obj._initialize_callback(event), order=10, ) - self._invalidate_initialize_handle = physx_event_stream.create_subscription_to_pop_by_type( - int(omni.physx.bindings._physx.SimulationEvent.STOPPED), + self._invalidate_initialize_handle = timeline_event_stream.create_subscription_to_pop_by_type( + int(omni.timeline.TimelineEventType.STOP), lambda event, obj=weakref.proxy(self): obj._invalidate_initialize_callback(event), order=10, )