Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
6fd9082
adds initial code and implementation for xform class
Mayankm96 Dec 30, 2025
dcc4737
wraps code inside sdf block for optimization
Mayankm96 Dec 30, 2025
fcf6c1a
runs formatter
Mayankm96 Dec 30, 2025
f54ae43
updates doc strings
Mayankm96 Dec 30, 2025
2f9afad
fixes type-hinting
Mayankm96 Dec 30, 2025
c1413d4
removes isaac sim xform class from create_prim
Mayankm96 Dec 30, 2025
4652ac6
moves functions for pose to transforms module
Mayankm96 Dec 30, 2025
a10e419
adds api docs
Mayankm96 Dec 30, 2025
a1a714d
makes a function to abstract out convert world pose call
Mayankm96 Dec 30, 2025
d347aef
runs formatter
Mayankm96 Dec 30, 2025
9929597
adds test for different backend data types to create prim
Mayankm96 Dec 30, 2025
263054d
adds test for get usd references
Mayankm96 Dec 30, 2025
53a8ddb
adds error code
Mayankm96 Dec 30, 2025
590ff75
adds example for all transform calls
Mayankm96 Dec 30, 2025
8e5153f
runs formatter
Mayankm96 Dec 30, 2025
17d6936
fixes type issues and adds more tests for to_tuple
Mayankm96 Jan 2, 2026
836d0c6
Merge branch 'main' into fix/clear-xform
Mayankm96 Jan 2, 2026
62361ac
adds test for flaot precision in standardize
Mayankm96 Jan 2, 2026
113ac86
removes benchmark test
Mayankm96 Jan 2, 2026
b33eb9a
makes a habit of sending stage
Mayankm96 Jan 2, 2026
c7f6b23
use stage attributes
Mayankm96 Jan 2, 2026
b406521
optimization for root parent
Mayankm96 Jan 2, 2026
dc62696
adds test to validate xform ops order
Mayankm96 Jan 2, 2026
083a2c3
adds benchmark script
Mayankm96 Jan 2, 2026
366f338
moves xform prim view into views module
Mayankm96 Jan 2, 2026
8c5e7c1
fixes type error
Mayankm96 Jan 2, 2026
618e2f1
adds test for xform prim view
Mayankm96 Jan 2, 2026
bd98dda
adds clear op
Mayankm96 Jan 2, 2026
56cf54d
adds franka test
Mayankm96 Jan 2, 2026
cbbccdf
fixes check for non-xform xformable
Mayankm96 Jan 2, 2026
33576d4
fixes usd path
Mayankm96 Jan 2, 2026
381d489
switches internals to use new xformview
Mayankm96 Jan 2, 2026
b1b5350
adds views to docs
Mayankm96 Jan 2, 2026
3a085d1
adds new implementations
Mayankm96 Jan 2, 2026
a75f85d
Merge branch 'fix/clear-xform' into feautre/xform-view
Mayankm96 Jan 2, 2026
a5a9648
removes unused initialize
Mayankm96 Jan 2, 2026
98d3388
switches to comparing with experimental api of isaacsim
Mayankm96 Jan 2, 2026
e4eee14
renames to XformPrimView
Mayankm96 Jan 2, 2026
4aab3c5
adds type ignore
Mayankm96 Jan 2, 2026
9de9fea
adds validation arg
Mayankm96 Jan 2, 2026
b5d1e38
fixes for new xform class
Mayankm96 Jan 2, 2026
3145c52
adds support for indices
Mayankm96 Jan 2, 2026
82f10f4
runs formatter
Mayankm96 Jan 2, 2026
9104778
modifies script to benchmark different xform apis
Mayankm96 Jan 2, 2026
8527b3b
uses xform cache
Mayankm96 Jan 2, 2026
6834e09
runs formatter
Mayankm96 Jan 2, 2026
9faf081
adds note for why we don't use the utils functions
Mayankm96 Jan 2, 2026
dad21af
fixes typehints
Mayankm96 Jan 2, 2026
67faf0a
use inplace operation for ortho
Mayankm96 Jan 2, 2026
2bc8c1e
ensures stage is cached for deletion
Mayankm96 Jan 2, 2026
ac1619b
updates changelog
Mayankm96 Jan 2, 2026
9bfada7
Merge branch 'fix/clear-xform' into feautre/xform-view
Mayankm96 Jan 2, 2026
6a7d78d
Merge branch 'main' into feautre/xform-view
Mayankm96 Jan 2, 2026
28f1348
removes exe from top
Mayankm96 Jan 2, 2026
582d281
fixes for extras
Mayankm96 Jan 2, 2026
1b3f82a
hopes
Mayankm96 Jan 2, 2026
e8afe79
Merge branch 'main' into feautre/xform-view
Mayankm96 Jan 2, 2026
f504226
Merge branch 'main' into feature/sim-context
Mayankm96 Jan 3, 2026
34a0770
moves to follow ordering
Mayankm96 Jan 3, 2026
bf10837
removes unused clear callbacks
Mayankm96 Jan 3, 2026
b77a28c
fixes run instructions
Mayankm96 Jan 3, 2026
865502d
reuse gravity
Mayankm96 Jan 3, 2026
8e5d080
fixes some bugs
Mayankm96 Jan 3, 2026
bddd0c2
removes other locations of clear_all_callbacks
Mayankm96 Jan 3, 2026
8da331f
hacks in some fixes
Mayankm96 Jan 3, 2026
a253344
handles different indexing schemes
Mayankm96 Jan 3, 2026
58d031b
fixes bug with indexing
Mayankm96 Jan 3, 2026
2928529
adds test for indexing
Mayankm96 Jan 3, 2026
dcf8d10
Merge branch 'feautre/xform-view' of github.com:Mayankm96/IsaacLab in…
Mayankm96 Jan 3, 2026
25a313e
moves file for naming
Mayankm96 Jan 3, 2026
bcee357
fixes doc
Mayankm96 Jan 3, 2026
51d68c0
format fixes
Mayankm96 Jan 3, 2026
c81a2d9
fixes initialization
Mayankm96 Jan 3, 2026
a2f6548
adds todos
Mayankm96 Jan 3, 2026
1d8d50a
adds more tests for sim context operations
Mayankm96 Jan 3, 2026
832db86
remove boundedness as that test is wrong
Mayankm96 Jan 3, 2026
fae3e0c
adds get physics dt for funsies
Mayankm96 Jan 3, 2026
3b6fb8a
adds callback tests
Mayankm96 Jan 3, 2026
e77de12
fixes imports
Mayankm96 Jan 3, 2026
f1afe76
fixes reset pausing
Mayankm96 Jan 3, 2026
b0a2949
adds test for isaac sim events
Mayankm96 Jan 3, 2026
567c10d
makes logger file more visible
Mayankm96 Jan 3, 2026
2a42985
typo
Mayankm96 Jan 3, 2026
68bb030
fixes info not logging to logger
Mayankm96 Jan 3, 2026
eed1305
makes formatter nicer
Mayankm96 Jan 3, 2026
11625d7
makes error bold red
Mayankm96 Jan 3, 2026
d94635d
fixes error from some code
Mayankm96 Jan 3, 2026
ceeaf5e
makes border length match
Mayankm96 Jan 3, 2026
c7b8437
fixes printing of table in articulation
Mayankm96 Jan 3, 2026
682ddfd
fies how check for callback is done
Mayankm96 Jan 3, 2026
5b97b78
fixes init errors
Mayankm96 Jan 3, 2026
ffcf770
comments out detach stage for now
Mayankm96 Jan 3, 2026
32f4165
uses simulation manager for context ops
Mayankm96 Jan 3, 2026
a4bd7cb
removes builtin check since we are always in non-app mode
Mayankm96 Jan 3, 2026
2d6d8ad
removes terminal check from other places
Mayankm96 Jan 3, 2026
11a9c25
adds test for exception raised in callbacks
Mayankm96 Jan 3, 2026
db9e25d
adds stage attribute to clear stage
Mayankm96 Jan 3, 2026
0672828
fixes callback calls
Mayankm96 Jan 3, 2026
a120b91
ensures exception are caught
Mayankm96 Jan 3, 2026
235a9e8
makes sure to not cache if added manually
Mayankm96 Jan 3, 2026
283669f
Merge branch 'main' into feature/sim-context
Mayankm96 Jan 3, 2026
a530d7e
Merge branch 'feautre/xform-view' into feature/sim-context
Mayankm96 Jan 3, 2026
62e0a98
Merge branch 'main' into feature/sim-context
Mayankm96 Jan 3, 2026
031f171
runs formatter
Mayankm96 Jan 3, 2026
f248424
add future import
Mayankm96 Jan 3, 2026
f9e29e3
mark unused
Mayankm96 Jan 3, 2026
17ce717
adds other settings
Mayankm96 Jan 3, 2026
3d6f1a4
adds missing residuals
Mayankm96 Jan 3, 2026
e1e1302
passes stage over for creating mdl material
Mayankm96 Jan 5, 2026
d7d952e
Merge branch 'main' into feature/sim-context
Mayankm96 Jan 7, 2026
8c9ae3a
adding fixes for stage in mem unit tests
matthewtrepte Jan 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion scripts/benchmarks/benchmark_xform_prim_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ def benchmark_xform_prim_view(

# close simulation
sim.clear()
sim.clear_all_callbacks()
sim.clear_instance()

return timing_results, computed_results
Expand Down
15 changes: 9 additions & 6 deletions source/isaaclab/isaaclab/assets/asset_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,18 @@ def _initialize_callback(self, event):
called whenever the simulator "plays" from a "stop" state.
"""
if not self._is_initialized:
# obtain simulation related information
self._backend = SimulationManager.get_backend()
self._device = SimulationManager.get_physics_sim_device()
# initialize the asset
try:
# Obtain Simulation Context
sim = sim_utils.SimulationContext.instance()
if sim is None:
raise RuntimeError("Simulation Context is not initialized!")
# Obtain device and backend
self._device = sim.device
# initialize the asset
self._initialize_impl()
except Exception as e:
if builtins.ISAACLAB_CALLBACK_EXCEPTION is None:
builtins.ISAACLAB_CALLBACK_EXCEPTION = e
if builtins.ISAACLAB_CALLBACK_EXCEPTION is None: # type: ignore
builtins.ISAACLAB_CALLBACK_EXCEPTION = e # type: ignore
# set flag
self._is_initialized = True

Expand Down
23 changes: 10 additions & 13 deletions source/isaaclab/isaaclab/envs/direct_marl_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from __future__ import annotations

import builtins
import gymnasium as gym
import inspect
import logging
Expand Down Expand Up @@ -150,17 +149,16 @@ def __init__(self, cfg: DirectMARLEnvCfg, render_mode: str | None = None, **kwar
# play the simulator to activate physics handles
# note: this activates the physics simulation view that exposes TensorAPIs
# note: when started in extension mode, first call sim.reset_async() and then initialize the managers
if builtins.ISAAC_LAUNCHED_FROM_TERMINAL is False:
print("[INFO]: Starting the simulation. This may take a few seconds. Please wait...")
with Timer("[INFO]: Time taken for simulation start", "simulation_start"):
# since the reset can trigger callbacks which use the stage,
# we need to set the stage context here
with use_stage(self.sim.get_initial_stage()):
self.sim.reset()
# update scene to pre populate data buffers for assets and sensors.
# this is needed for the observation manager to get valid tensors for initialization.
# this shouldn't cause an issue since later on, users do a reset over all the environments so the lazy buffers would be reset.
self.scene.update(dt=self.physics_dt)
print("[INFO]: Starting the simulation. This may take a few seconds. Please wait...")
with Timer("[INFO]: Time taken for simulation start", "simulation_start"):
# since the reset can trigger callbacks which use the stage,
# we need to set the stage context here
with use_stage(self.sim.get_initial_stage()):
self.sim.reset()
# update scene to pre populate data buffers for assets and sensors.
# this is needed for the observation manager to get valid tensors for initialization.
# this shouldn't cause an issue since later on, users do a reset over all the environments so the lazy buffers would be reset.
self.scene.update(dt=self.physics_dt)

# check if debug visualization is has been implemented by the environment
source_code = inspect.getsource(self._set_debug_vis_impl)
Expand Down Expand Up @@ -549,7 +547,6 @@ def close(self):
self.sim.stop()
self.sim.clear()

self.sim.clear_all_callbacks()
self.sim.clear_instance()

# destroy the window
Expand Down
23 changes: 10 additions & 13 deletions source/isaaclab/isaaclab/envs/direct_rl_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from __future__ import annotations

import builtins
import gymnasium as gym
import inspect
import logging
Expand Down Expand Up @@ -157,17 +156,16 @@ def __init__(self, cfg: DirectRLEnvCfg, render_mode: str | None = None, **kwargs
# play the simulator to activate physics handles
# note: this activates the physics simulation view that exposes TensorAPIs
# note: when started in extension mode, first call sim.reset_async() and then initialize the managers
if builtins.ISAAC_LAUNCHED_FROM_TERMINAL is False:
print("[INFO]: Starting the simulation. This may take a few seconds. Please wait...")
with Timer("[INFO]: Time taken for simulation start", "simulation_start"):
# since the reset can trigger callbacks which use the stage,
# we need to set the stage context here
with use_stage(self.sim.get_initial_stage()):
self.sim.reset()
# update scene to pre populate data buffers for assets and sensors.
# this is needed for the observation manager to get valid tensors for initialization.
# this shouldn't cause an issue since later on, users do a reset over all the environments so the lazy buffers would be reset.
self.scene.update(dt=self.physics_dt)
print("[INFO]: Starting the simulation. This may take a few seconds. Please wait...")
with Timer("[INFO]: Time taken for simulation start", "simulation_start"):
# since the reset can trigger callbacks which use the stage,
# we need to set the stage context here
with use_stage(self.sim.get_initial_stage()):
self.sim.reset()
# update scene to pre populate data buffers for assets and sensors.
# this is needed for the observation manager to get valid tensors for initialization.
# this shouldn't cause an issue since later on, users do a reset over all the environments so the lazy buffers would be reset.
self.scene.update(dt=self.physics_dt)

# check if debug visualization is has been implemented by the environment
source_code = inspect.getsource(self._set_debug_vis_impl)
Expand Down Expand Up @@ -518,7 +516,6 @@ def close(self):
self.sim.stop()
self.sim.clear()

self.sim.clear_all_callbacks()
self.sim.clear_instance()

# destroy the window
Expand Down
33 changes: 13 additions & 20 deletions source/isaaclab/isaaclab/envs/manager_based_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#
# SPDX-License-Identifier: BSD-3-Clause

import builtins
import logging
import torch
import warnings
Expand Down Expand Up @@ -101,11 +100,7 @@ def __init__(self, cfg: ManagerBasedEnvCfg):
# since it gets confused with Isaac Sim's SimulationContext class
self.sim: SimulationContext = SimulationContext(self.cfg.sim)
else:
# simulation context should only be created before the environment
# when in extension mode
if not builtins.ISAAC_LAUNCHED_FROM_TERMINAL:
raise RuntimeError("Simulation context already exists. Cannot create a new one.")
self.sim: SimulationContext = SimulationContext.instance()
raise RuntimeError("Simulation context already exists. Cannot create a new one.")

# make sure torch is running on the correct device
if "cuda" in self.device:
Expand Down Expand Up @@ -162,19 +157,18 @@ def __init__(self, cfg: ManagerBasedEnvCfg):
# play the simulator to activate physics handles
# note: this activates the physics simulation view that exposes TensorAPIs
# note: when started in extension mode, first call sim.reset_async() and then initialize the managers
if builtins.ISAAC_LAUNCHED_FROM_TERMINAL is False:
print("[INFO]: Starting the simulation. This may take a few seconds. Please wait...")
with Timer("[INFO]: Time taken for simulation start", "simulation_start"):
# since the reset can trigger callbacks which use the stage,
# we need to set the stage context here
with use_stage(self.sim.get_initial_stage()):
self.sim.reset()
# update scene to pre populate data buffers for assets and sensors.
# this is needed for the observation manager to get valid tensors for initialization.
# this shouldn't cause an issue since later on, users do a reset over all the environments so the lazy buffers would be reset.
self.scene.update(dt=self.physics_dt)
# add timeline event to load managers
self.load_managers()
print("[INFO]: Starting the simulation. This may take a few seconds. Please wait...")
with Timer("[INFO]: Time taken for simulation start", "simulation_start"):
# since the reset can trigger callbacks which use the stage,
# we need to set the stage context here
with use_stage(self.sim.get_initial_stage()):
self.sim.reset()
# update scene to pre populate data buffers for assets and sensors.
# this is needed for the observation manager to get valid tensors for initialization.
# this shouldn't cause an issue since later on, users do a reset over all the environments so the lazy buffers would be reset.
self.scene.update(dt=self.physics_dt)
# add timeline event to load managers
self.load_managers()

# extend UI elements
# we need to do this here after all the managers are initialized
Expand Down Expand Up @@ -536,7 +530,6 @@ def close(self):
self.sim.stop()
self.sim.clear()

self.sim.clear_all_callbacks()
self.sim.clear_instance()

# destroy the window
Expand Down
5 changes: 2 additions & 3 deletions source/isaaclab/isaaclab/sensors/sensor_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ def _initialize_impl(self):
raise RuntimeError("Simulation Context is not initialized!")
# Obtain device and backend
self._device = sim.device
self._backend = sim.backend
self._sim_physics_dt = sim.get_physics_dt()
# Count number of environments
env_prim_path_expr = self.cfg.prim_path.rsplit("/", 1)[0]
Expand Down Expand Up @@ -301,8 +300,8 @@ def _initialize_callback(self, event):
try:
self._initialize_impl()
except Exception as e:
if builtins.ISAACLAB_CALLBACK_EXCEPTION is None:
builtins.ISAACLAB_CALLBACK_EXCEPTION = e
if builtins.ISAACLAB_CALLBACK_EXCEPTION is None: # type: ignore
builtins.ISAACLAB_CALLBACK_EXCEPTION = e # type: ignore
self._is_initialized = True

def _invalidate_initialize_callback(self, event):
Expand Down
40 changes: 20 additions & 20 deletions source/isaaclab/isaaclab/sim/simulation_cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,26 @@ class PhysxCfg:
* :obj:`1`: TGS (Temporal Gauss-Seidel)
"""

solve_articulation_contact_last: bool = False
"""Changes the ordering inside the articulation solver. Default is False.

PhysX employs a strict ordering for handling constraints in an articulation. The outcome of
each constraint resolution modifies the joint and associated link speeds. However, the default
ordering may not be ideal for gripping scenarios because the solver favours the constraint
types that are resolved last. This is particularly true of stiff constraint systems that are hard
to resolve without resorting to vanishingly small simulation timesteps.

With dynamic contact resolution being such an important part of gripping, it may make
more sense to solve dynamic contact towards the end of the solver rather than at the
beginning. This parameter modifies the default ordering to enable this change.

For more information, please check `here <https://docs.omniverse.nvidia.com/kit/docs/omni_physics/107.3/dev_guide/guides/articulation_stability_guide.html#articulation-solver-order>`__.

.. versionadded:: v2.3
This parameter is only available with Isaac Sim 5.1.

"""

min_position_iteration_count: int = 1
"""Minimum number of solver position iterations (rigid bodies, cloth, particles etc.). Default is 1.

Expand Down Expand Up @@ -173,26 +193,6 @@ class PhysxCfg:
gpu_max_particle_contacts: int = 2**20
"""Size of particle contacts stream buffer allocated in pinned host memory. Default is 2 ** 20."""

solve_articulation_contact_last: bool = False
"""Changes the ordering inside the articulation solver. Default is False.

PhysX employs a strict ordering for handling constraints in an articulation. The outcome of
each constraint resolution modifies the joint and associated link speeds. However, the default
ordering may not be ideal for gripping scenarios because the solver favours the constraint
types that are resolved last. This is particularly true of stiff constraint systems that are hard
to resolve without resorting to vanishingly small simulation timesteps.

With dynamic contact resolution being such an important part of gripping, it may make
more sense to solve dynamic contact towards the end of the solver rather than at the
beginning. This parameter modifies the default ordering to enable this change.

For more information, please check `here <https://docs.omniverse.nvidia.com/kit/docs/omni_physics/107.3/dev_guide/guides/articulation_stability_guide.html#articulation-solver-order>`__.

.. versionadded:: v2.3
This parameter is only available with Isaac Sim 5.1.

"""


@configclass
class RenderCfg:
Expand Down
Loading
Loading