API#

Python API#

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

An enumeration.


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 set_backend(val: str) None#
classmethod get_backend() str#
classmethod get_physics_sim_view()#
classmethod set_physics_sim_device(val) None#
classmethod get_physics_sim_device() str#
classmethod get_physics_dt(
physics_scene: str | None = 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_broadphase_type(
physics_scene: str | None = 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 set_broadphase_type(
val: str,
physics_scene: str | None = 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 enable_gpu_dynamics(
flag: bool,
physics_scene: str | None = None,
) None#

Enables gpu dynamics pipeline, required for deformables for instance.

Parameters:
  • flag (bool) – enables or disables gpu dynamics 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 is_gpu_dynamics_enabled(
physics_scene: str | None = 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 enable_fabric(enable)#
classmethod is_fabric_enabled(enable)#
classmethod set_solver_type(
solver_type: str,
physics_scene: str | None = 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 get_solver_type(
physics_scene: str | None = 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 enable_stablization(
flag: bool,
physics_scene: str | None = 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 is_stablization_enabled(
physics_scene: str | None = 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)#
classmethod deregister_callback(callback_id)#
classmethod enable_usd_notice_handler(flag)#
classmethod enable_fabric_usd_notice_handler(stage_id, flag)#
classmethod is_fabric_usd_notice_handler_enabled(stage_id)#
classmethod assets_loading() bool#

Checks if textures are loaded.

Returns:

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

Return type:

bool

class IsaacEvents(value)#

Bases: Enum

An enumeration.