OmnikitHelper [omni.isaac.python_app]¶
This extension provides convenience functions when running in pure python mode
-
class
OmniKitHelper
(config={'active_gpu': None, 'anti_aliasing': 3, 'denoiser': True, 'display_options': 0, 'experience': 'isaac-sim.python.kit', 'headless': True, 'height': 800, 'max_bounces': 4, 'max_specular_transmission_bounces': 6, 'max_volume_bounces': 4, 'renderer': 'PathTracing', 'samples_per_pixel_per_frame': 64, 'subdiv_refinement_level': 0, 'sync_loads': False, 'width': 1024, 'window_height': 900, 'window_width': 1440})¶ Deprecated: Please use omni.isaac.kit.SimulationApp Helper class for launching OmniKit from a Python environment.
-
DEFAULT_CONFIG
= {'active_gpu': None, 'anti_aliasing': 3, 'denoiser': True, 'display_options': 0, 'experience': 'isaac-sim.python.kit', 'headless': True, 'height': 800, 'max_bounces': 4, 'max_specular_transmission_bounces': 6, 'max_volume_bounces': 4, 'renderer': 'PathTracing', 'samples_per_pixel_per_frame': 64, 'subdiv_refinement_level': 0, 'sync_loads': False, 'width': 1024, 'window_height': 900, 'window_width': 1440}¶
-
create_prim
(path, prim_type, translation=None, rotation=None, scale=None, ref=None, semantic_label=None, attributes={})¶ Create a prim, apply specified transforms, apply semantic label and set specified attributes.
- Parameters
path (str) – The path of the new prim.
prim_type (str) – Prim type name
translation (tuple(float, float, float), optional) – prim translation (applied last)
rotation (tuple(float, float, float), optional) – prim rotation in degrees with rotation order ZYX.
scale (tuple(float, float, float), optional) – scaling factor in x, y, z.
ref (str, optional) – Path to the USD that this prim will reference.
semantic_label (str, optional) – Semantic label.
attributes (dict, optional) – Key-value pairs of prim attributes to set.
-
execute
(*args, **kwargs)¶ Allow use of omni.kit.commands interface
-
get_context
()¶ Returns the current USD context.
-
get_stage
()¶ Returns the current USD stage.
-
get_status
()¶ Get the status of the renderer to see if anything is loading
-
is_exiting
()¶ get current exit status for this object :returns: True if exit() was called previously, False otherwise :rtype: bool
-
is_loading
()¶ convenience function to see if any files are being loaded
- Returns
True if loading, False otherwise
- Return type
bool
-
pause
()¶ Pauses the editor physics simulation
-
play
()¶ Starts the editor physics simulation
-
set_physics_dt
(physics_dt: float = 0.016666666666666666, physics_substeps: int = 1)¶ Specify the physics step size to use when simulating, default is 1/60. Note that a physics scene has to be in the stage for this to do anything
- Parameters
physics_dt (float) – Use this value for physics step
physics_substeps (int) – The number of physics substeps to perform each editor timestep
-
set_setting
(setting, value)¶ Convenience function to set settings.
- Parameters
setting (str) – string representing the setting being changed
value – new value for the setting being changed, the type of this value must match its repsective setting
-
set_up_axis
(axis)¶ Change the up axis of the current stage
- Parameters
axis – valid values are UsdGeom.Tokens.y, or UsdGeom.Tokens.z
-
setup_renderer
(mode='non-default')¶ Sets the defaults for the renderer based on the config provided at initialization
-
shutdown
()¶
-
stop
()¶ Stops the editor physics simulation
-
update
(dt=0.0, physics_dt=None, physics_substeps=None)¶ Render one frame. Optionally specify dt in seconds, specify None to use wallclock. Specify physics_dt and physics_substeps to decouple the physics step size from rendering
- For example: to render with a dt of 1/30 and simulate physics at 1/120 use:
dt = 1/30.0
physics_dt = 1/120.0
physics_substeps = 4
- Parameters
dt (float) – The step size used for the overall update, set to None to use wallclock
physics_dt (float, optional) – If specified use this value for physics step
physics_substeps (int, optional) – Maximum number of physics substeps to perform
-