API#

Python API#

SimulationEvent

Simulation event types.

SimulationManager

This class provide functions that take care of many time-related events such as warm starting simulation in order for the physics data to be retrievable.

IsaacEvents

Isaac events types.


class SimulationEvent(
value,
names=<not given>,
*values,
module=None,
qualname=None,
type=None,
start=1,
boundary=None,
)#

Simulation event types.

PHYSICS_POST_STEP = 'isaacsim.simulation.physics_post_step'#

Event triggered after a physics step is performed.

PHYSICS_PRE_STEP = 'isaacsim.simulation.physics_pre_step'#

Event triggered before a physics step is performed.

PRIM_DELETED = 'isaacsim.simulation.prim_deleted'#

Event triggered when a prim is deleted from the stage.

SIMULATION_PAUSED = 'isaacsim.simulation.paused'#

Event triggered when the simulation is paused.

SIMULATION_RESUMED = 'isaacsim.simulation.resumed'#

Event triggered when the simulation is resumed.

The simulation is resumed when the application is played again after being paused.

SIMULATION_SETUP = 'isaacsim.simulation.simulation_setup'#

Event triggered when the simulation setup is complete.

The simulation setup is complete once 1) the application has been played and 2) a warm-up step has been performed. The warm-up step ensures that:

  • The physics engine creates and initializes its internal state for the attached stage.

  • An entry point to the physics engine is created through omni.physics.tensors.

At that point, the simulation is ready to advance.

SIMULATION_STARTED = 'isaacsim.simulation.started'#

Event triggered when the simulation setup is complete and the simulation is ready to advance.

SIMULATION_STOPPED = 'isaacsim.simulation.stopped'#

Event triggered when the simulation is stopped.

class SimulationManager#

Bases: object

This class provide functions that take care of many time-related events such as warm starting simulation in order for the physics data to be retrievable. Adding/ removing callback functions that gets triggered with certain events such as a physics step, on post reset, on physics ready..etc.

classmethod assets_loading() bool#

Checks if textures are loaded.

Returns:

True if textures are loading and not done yet, otherwise False.

Return type:

bool

classmethod deregister_callback(callback_id)#

Deregisters a callback which was previously registered using register_callback.

Parameters:

callback_id – The ID of the callback returned by register_callback to deregister.

classmethod enable_all_default_callbacks(
enable: bool = True,
) None#

Enable or disable all default callbacks. Default callbacks are: warm_start, on_stop, post_warm_start, stage_open.

Parameters:

enable – Whether to enable all callbacks.

classmethod enable_ccd(
flag: bool,
physics_scene: str = None,
) None#

Enables Continuous Collision Detection (CCD).

Parameters:
  • flag (bool) – enables or disables CCD on the PhysicsScene.

  • physics_scene (str, optional) – physics scene prim path.

Raises:

Exception – If the prim path registered in context doesn’t correspond to a valid prim path currently.

classmethod enable_fabric(enable)#

Enables or disables physics fabric integration and associated settings.

Parameters:

enable – Whether to enable or disable fabric.

classmethod enable_fabric_usd_notice_handler(stage_id, flag)#

Enables or disables the fabric usd notice handler.

Parameters:
  • stage_id – The stage ID to enable or disable the handler for.

  • flag – Whether to enable or disable the handler.

classmethod enable_gpu_dynamics(
flag: bool,
physics_scene: str = None,
) None#

Enables gpu dynamics pipeline, required for deformables for instance.

Parameters:
  • flag (bool) – enables or disables gpu dynamics on the PhysicsScene. If flag is true, CCD is disabled.

  • physics_scene (str, optional) – physics scene prim path.

Raises:

Exception – If the prim path registered in context doesn’t correspond to a valid prim path currently.

classmethod enable_on_stop_callback(enable: bool = True) None#

Enable or disable the on stop callback.

Parameters:

enable – Whether to enable the callback.

classmethod enable_post_warm_start_callback(
enable: bool = True,
) None#

Enable or disable the post warm start callback.

Deprecated since version 1.7.0:
The PHYSICS_WARMUP event is deprecated. Calling this method will have no effect.

Parameters:

enable – Whether to enable the callback.

classmethod enable_stablization(
flag: bool,
physics_scene: str = None,
) None#

Enables additional stabilization pass in the solver.

Parameters:
  • flag (bool) – enables or disables stabilization on the PhysicsScene

  • physics_scene (str, optional) – physics scene prim path.

Raises:

Exception – If the prim path registered in context doesn’t correspond to a valid prim path currently.

classmethod enable_stage_open_callback(
enable: bool = True,
) None#

Enable or disable the stage open callback. Note: This also enables/disables the assets loading and loaded callbacks. If disabled, assets_loading() will always return True.

Parameters:

enable – Whether to enable the callback.

classmethod enable_usd_notice_handler(flag)#

Enables or disables the usd notice handler.

Parameters:

flag – Whether to enable or disable the handler.

classmethod enable_warm_start_callback(
enable: bool = True,
) None#

Enable or disable the warm start callback.

Parameters:

enable – Whether to enable the callback.

classmethod get_backend() str#

Get the backend used by the simulation manager.

Deprecated since version 1.7.0:
No replacement is provided, as the core experimental API relies solely on Warp.

classmethod get_broadphase_type(
physics_scene: str = None,
) str#

Gets current broadcast phase algorithm type.

Parameters:

physics_scene (str, optional) – physics scene prim path.

Raises:

Exception – If the prim path registered in context doesn’t correspond to a valid prim path currently.

Returns:

Broadcast phase algorithm used.

Return type:

str

classmethod get_default_callback_status() dict#

Get the status of all default callbacks. Default callbacks are: warm_start, on_stop, post_warm_start, stage_open.

Returns:

Dictionary with callback names and their enabled status.

classmethod get_default_physics_scene() str#
classmethod get_num_physics_steps()#
classmethod get_physics_dt(physics_scene: str = None) str#

Returns the current physics dt.

Parameters:

physics_scene (str, optional) – physics scene prim path.

Raises:

Exception – If the prim path registered in context doesn’t correspond to a valid prim path currently.

Returns:

physics dt.

Return type:

float

classmethod get_physics_sim_device() str#
classmethod get_physics_sim_view()#
classmethod get_simulation_time()#
classmethod get_solver_type(physics_scene: str = None) str#

Gets current solver type.

Parameters:

physics_scene (str, optional) – physics scene prim path.

Raises:

Exception – If the prim path registered in context doesn’t correspond to a valid prim path currently.

Returns:

solver used for simulation.

Return type:

str

classmethod initialize_physics() None#
classmethod is_ccd_enabled(physics_scene: str = None) bool#

Checks if Continuous Collision Detection (CCD) is enabled.

Parameters:

physics_scene (str, optional) – physics scene prim path.

Raises:

Exception – If the prim path registered in context doesn’t correspond to a valid prim path currently.

Returns:

True if CCD is enabled, otherwise False.

Return type:

bool

classmethod is_default_callback_enabled(
callback_name: str,
) bool#

Check if a specific default callback is enabled. Default callbacks are: warm_start, on_stop, post_warm_start, stage_open.

Parameters:

callback_name – Name of the callback to check.

Returns:

Whether the callback is enabled.

classmethod is_fabric_enabled()#

Check if fabric is enabled.

Returns:

True if fabric is enabled, otherwise False.

Return type:

bool

classmethod is_fabric_usd_notice_handler_enabled(stage_id)#

Checks if fabric usd notice handler is enabled.

Parameters:

stage_id – The stage ID to check.

Returns:

True if fabric usd notice handler is enabled, otherwise False.

Return type:

bool

classmethod is_gpu_dynamics_enabled(
physics_scene: str = None,
) bool#

Checks if Gpu Dynamics is enabled.

Parameters:

physics_scene (str, optional) – physics scene prim path.

Raises:

Exception – If the prim path registered in context doesn’t correspond to a valid prim path currently.

Returns:

True if Gpu Dynamics is enabled, otherwise False.

Return type:

bool

classmethod is_paused()#
classmethod is_simulating()#
classmethod is_stablization_enabled(
physics_scene: str = None,
) bool#

Checks if stabilization is enabled.

Parameters:

physics_scene (str, optional) – physics scene prim path.

Raises:

Exception – If the prim path registered in context doesn’t correspond to a valid prim path currently.

Returns:

True if stabilization is enabled, otherwise False.

Return type:

bool

classmethod register_callback(
callback: Callable,
event: SimulationEvent | IsaacEvents,
order: int = 0,
**kwargs,
) int#

Register/subscribe a callback to be triggered when a specific simulation event occurs.

Warning

The parameter name is not longer supported. A warning message will be logged if it is defined. Future versions will completely remove it. At that time, defining it will result in an exception.

Parameters:
  • callback – The callback function to register.

  • event – The simulation event to subscribe to.

  • order – The subscription order. Callbacks registered within the same order will be triggered in the order they were registered.

Returns:

The unique identifier of the callback subscription.

Raises:

ValueError – If event is invalid.

classmethod set_backend(val: str) None#

Set the backend used by the simulation manager.

Deprecated since version 1.7.0:
No replacement is provided, as the core experimental API relies solely on Warp.

classmethod set_broadphase_type(
val: str,
physics_scene: str = None,
) None#

Broadcast phase algorithm used in simulation.

Parameters:
  • val (str) – type of broadcasting to be used, can be “MBP”.

  • physics_scene (str, optional) – physics scene prim path.

Raises:

Exception – If the prim path registered in context doesn’t correspond to a valid prim path currently.

classmethod set_default_physics_scene(
physics_scene_prim_path: str,
)#
classmethod set_physics_dt(
dt: float = 0.016666666666666666,
physics_scene: str = None,
) None#

Sets the physics dt on the physics scene provided.

Parameters:
  • dt (float, optional) – physics dt. Defaults to 1.0/60.0.

  • physics_scene (str, optional) – physics scene prim path. Defaults to first physics scene found in the stage.

Raises:
  • RuntimeError – If the simulation is running/playing and dt is being set.

  • Exception – If the prim path registered in context doesn’t correspond to a valid prim path currently.

  • ValueError – If the dt is not in the range [0.0, 1.0].

classmethod set_physics_sim_device(val) None#
classmethod set_solver_type(
solver_type: str,
physics_scene: str = None,
) None#

solver used for simulation.

Parameters:
  • solver_type (str) – can be “TGS” or “PGS”.

  • physics_scene (str, optional) – physics scene prim path.

Raises:

Exception – If the prim path registered in context doesn’t correspond to a valid prim path currently.

classmethod step(
*,
steps: int = 1,
callback: Callable[[int, int], bool | None] | None = None,
update_fabric: bool = False,
) None#

Step the physics simulation.

Parameters:
  • steps – Number of steps to perform.

  • callback – Optional callback function to call after each step. The function should take two arguments: the current step number and the total number of steps. If no return value is provided, the internal loop will run for the specified number of steps. However, if the function returns False, no more steps will be performed.

  • update_fabric – Whether to update fabric with the latest physics results after each step.

Raises:

ValueError – If the fabric is not enabled and update_fabric is set to True.

class IsaacEvents(
value,
names=<not given>,
*values,
module=None,
qualname=None,
type=None,
start=1,
boundary=None,
)#

Bases: Enum

Isaac events types.

Deprecated since version 1.7.0: Use SimulationEvent enum instead.

PHYSICS_READY = 'isaac.physics_ready'#

Physics ready.

Deprecated since version 1.7.0: Use SimulationEvent’s SIMULATION_STARTED instead.

PHYSICS_WARMUP = 'isaac.physics_warmup'#

Physics warm-up.

Deprecated since version 1.7.0: Use SimulationEvent’s SIMULATION_SETUP instead.

POST_PHYSICS_STEP = 'isaac.post_physics_step'#

Post physics step.

Deprecated since version 1.7.0: Use SimulationEvent’s PHYSICS_POST_STEP instead.

POST_RESET = 'isaac.post_reset'#

Post reset.

Deprecated since version 1.7.0:
No replacement is provided, as the core experimental API does not use such event.

PRE_PHYSICS_STEP = 'isaac.pre_physics_step'#

Pre physics step.

Deprecated since version 1.7.0: Use SimulationEvent’s PHYSICS_PRE_STEP instead.

PRIM_DELETION = 'isaac.prim_deletion'#

Prim deletion.

Deprecated since version 1.7.0: Use SimulationEvent’s PRIM_DELETED instead.

SIMULATION_VIEW_CREATED = 'isaac.simulation_view_created'#

Simulation view created.

Deprecated since version 1.7.0: Use SimulationEvent’s SIMULATION_SETUP instead.

TIMELINE_STOP = 'isaac.timeline_stop'#

Timeline stop.

Deprecated since version 1.7.0: Use SimulationEvent’s SIMULATION_STOPPED instead.