Skip to content

Commit 0ba9c5c

Browse files
ooctipuskellyguo11
andauthored
Decouples physics backends from SimulationContext via PhysicsManager (#4564)
# Description Refactors SimulationContext to use a PhysicsManager abstraction layer, enabling cleaner separation between simulation orchestration and physics backend implementation. Introduces backward-compatible deprecation for configuration fields that moved to PhysxCfg. ## Type of change - New feature (non-breaking change which adds functionality) - Breaking change (existing functionality will not work without user modification) - Documentation update ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./isaaclab.sh --format` - [x] I have made corresponding changes to the documentation - [ ] My changes generate no new warnings - [x] I have added tests that prove my fix is effective or that my feature works - [x] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there <!-- As you go through the checklist above, you can mark something as done by putting an x character in it For example, - [x] I have done this task - [ ] I have not done this task --> --------- Signed-off-by: Kelly Guo <[email protected]> Co-authored-by: Kelly Guo <[email protected]>
1 parent 91b054f commit 0ba9c5c

File tree

153 files changed

+4623
-2336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+4623
-2336
lines changed

apps/isaaclab.python.kit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ keywords = ["experience", "app", "usd"]
1717
"isaacsim.core.api" = {}
1818
"isaacsim.core.cloner" = {}
1919
"isaacsim.core.nodes" = {}
20-
"isaacsim.core.simulation_manager" = {}
2120
"isaacsim.core.throttling" = {}
2221
"isaacsim.core.utils" = {}
2322
"isaacsim.core.version" = {}

apps/isaacsim_5/isaaclab.python.kit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ keywords = ["experience", "app", "usd"]
1717
"isaacsim.core.api" = {}
1818
"isaacsim.core.cloner" = {}
1919
"isaacsim.core.nodes" = {}
20-
"isaacsim.core.simulation_manager" = {}
2120
"isaacsim.core.throttling" = {}
2221
"isaacsim.core.utils" = {}
2322
"isaacsim.core.version" = {}

docs/source/how-to/optimize_stage_creation.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ be called after the stage is created.
6060
sim = SimulationContext(cfg=SimulationCfg(create_stage_in_memory=True))
6161
6262
# grab stage in memory and set stage context
63-
stage_in_memory = sim.get_initial_stage()
64-
with stage_utils.use_stage(stage_in_memory):
63+
with stage_utils.use_stage(sim.stage):
6564
# create cartpole scene
6665
scene_cfg = CartpoleSceneCfg(num_envs=1024)
6766
scene = InteractiveScene(scene_cfg)

scripts/benchmarks/benchmark_view_comparison.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@
7070

7171
import torch
7272

73-
from isaacsim.core.simulation_manager import SimulationManager
74-
7573
import isaaclab.sim as sim_utils
7674
from isaaclab.sim.views import XformPrimView
7775

@@ -138,7 +136,7 @@ def benchmark_view(view_type: str, num_iterations: int) -> tuple[dict[str, float
138136
num_prims = view.count
139137
view_name = "XformPrimView (Fabric)"
140138
else: # physx
141-
physics_sim_view = SimulationManager.get_physics_sim_view()
139+
physics_sim_view = sim.physics_manager.get_physics_sim_view()
142140
view = physics_sim_view.create_rigid_body_view(pattern)
143141
num_prims = view.count
144142
view_name = "PhysX RigidBodyView"
@@ -196,8 +194,6 @@ def benchmark_view(view_type: str, num_iterations: int) -> tuple[dict[str, float
196194
computed_results["world_orientations_after_set"] = orientations_after_set.clone()
197195

198196
# close simulation
199-
sim.clear()
200-
sim.clear_all_callbacks()
201197
sim.clear_instance()
202198

203199
return timing_results, computed_results

scripts/benchmarks/benchmark_xform_prim_view.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,6 @@ def benchmark_xform_prim_view( # noqa: C901
274274
timing_results["interleaved_world_set_get"] = (time.perf_counter() - start_time) / num_iterations
275275

276276
# close simulation
277-
sim.clear()
278-
sim.clear_all_callbacks()
279277
sim.clear_instance()
280278

281279
return timing_results, computed_results

scripts/tutorials/04_sensors/run_usd_camera.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def run_simulator(sim: sim_utils.SimulationContext, scene_entities: dict):
196196
camera_index = args_cli.camera_id
197197

198198
# Create the markers for the --draw option outside of is_running() loop
199-
if sim.has_gui() and args_cli.draw:
199+
if sim.get_setting("/isaaclab/has_gui") and args_cli.draw:
200200
cfg = RAY_CASTER_MARKER_CFG.replace(prim_path="/Visuals/CameraPointCloud")
201201
cfg.markers["hit"].radius = 0.002
202202
pc_markers = VisualizationMarkers(cfg)
@@ -248,7 +248,11 @@ def run_simulator(sim: sim_utils.SimulationContext, scene_entities: dict):
248248
rep_writer.write(rep_output)
249249

250250
# Draw pointcloud if there is a GUI and --draw has been passed
251-
if sim.has_gui() and args_cli.draw and "distance_to_image_plane" in camera.data.output.keys():
251+
if (
252+
sim.get_setting("/isaaclab/has_gui")
253+
and args_cli.draw
254+
and "distance_to_image_plane" in camera.data.output.keys()
255+
):
252256
# Derive pointcloud from camera at camera_index
253257
pointcloud = create_pointcloud_from_depth(
254258
intrinsic_matrix=camera.data.intrinsic_matrices[camera_index],

source/isaaclab/config/extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
# Note: Semantic Versioning is used: https://semver.org/
4-
version = "3.1.0"
4+
version = "3.2.0"
55

66
# Description
77
title = "Isaac Lab framework for Robot Learning"

source/isaaclab/docs/CHANGELOG.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
Changelog
22
---------
33

4+
5+
3.2.0 (2026-02-06)
6+
~~~~~~~~~~~~~~~~~~
7+
8+
Changed
9+
^^^^^^^
10+
11+
* Refactored :class:`~isaaclab.sim.SimulationContext` to use :class:`~isaaclab.physics.PhysicsManager`
12+
abstraction layer for cleaner separation between simulation orchestration and physics backend.
13+
14+
415
3.1.0 (2026-02-05)
516
~~~~~~~~~~~~~~~~~~
617

source/isaaclab/isaaclab/actuators/actuator_base_cfg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#
44
# SPDX-License-Identifier: BSD-3-Clause
55

6+
from __future__ import annotations
7+
68
from dataclasses import MISSING
79

810
from isaaclab.utils import configclass

source/isaaclab/isaaclab/app/app_launcher.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
:attr:`AppLauncher.app` property.
1313
"""
1414

15+
from __future__ import annotations
16+
1517
import argparse
1618
import contextlib
1719
import logging

0 commit comments

Comments
 (0)