Skip to content

Replaces Isaac Sim SimulationManager with IsaacLab SimulationManager#4475

Draft
ooctipus wants to merge 154 commits intoisaac-sim:developfrom
ooctipus:feature/simulation-manager
Draft

Replaces Isaac Sim SimulationManager with IsaacLab SimulationManager#4475
ooctipus wants to merge 154 commits intoisaac-sim:developfrom
ooctipus:feature/simulation-manager

Conversation

@ooctipus
Copy link
Collaborator

Description

Adds simulation manager that replaces Isaac sim simulation manager,
this is currently a draft, things are mostly working, but lacks clean up.

@ooctipus ooctipus requested a review from xyao-nv as a code owner February 3, 2026 15:13
@github-actions github-actions bot added the isaac-mimic Related to Isaac Mimic team label Feb 3, 2026
Copy link
Collaborator

@AntoineRichard AntoineRichard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intermediary review. I feel the code is a bit too convoluted at times. Let's sync on that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove the isaacsim_4_5 apps or do we plan on supporting those still?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove the isaacsim_4_5 apps or do we plan on supporting those still?

"isaacsim.core.cloner" = {}
"isaacsim.core.nodes" = {}
"isaacsim.core.simulation_manager" = {}
# "isaacsim.core.simulation_manager" = {} # Replaced by isaaclab.sim.simulation_manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can just be removed?

"isaacsim.core.cloner" = {}
"isaacsim.core.nodes" = {}
"isaacsim.core.simulation_manager" = {}
# "isaacsim.core.simulation_manager" = {} # Replaced by isaaclab.sim.simulation_manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be removed directly?

)
# register prim deletion callback
self._prim_deletion_callback_id = SimulationManager.register_callback(
self._prim_deletion_callback_id = PhysxManager.register_callback(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the callbacks should live in the simulation context. It's something that we could take a look at in an other PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not have that here. I understand that it was used for testing, but let's keep things pure PhysX for now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not have that here

Comment on lines +12 to +13
# from .newton_manager import NewtonManager
# from .newton_manager_cfg import NewtonManagerCfg
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's delete.

Comment on lines +22 to +23
# "NewtonManager",
# "NewtonManagerCfg",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This too!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general let's try to have only things that we can use here.

@ooctipus ooctipus marked this pull request as draft February 3, 2026 17:06
desired_orientation[:, 1] = 1.0
# create state machine
open_sm = OpenDrawerSm(env_cfg.sim.dt * env_cfg.decimation, env.unwrapped.num_envs, env.unwrapped.device)
open_sm = OpenDrawerSm(env_cfg.sim.physics_manager_cfg.dt * env_cfg.decimation, env.unwrapped.num_envs, env.unwrapped.device)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I like retrieving the attributes from env_cfg.sim.dt directly a bit more - would it make sense to still keep some common attributes in the SimulationCfg? probably also less breaking changes for user scripts

#
# SPDX-License-Identifier: BSD-3-Clause

"""Newton physics manager for Isaac Lab."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this being added here to also refactor it to match the new PhysicsManager interface? I'm not sure if we anticipate more changes for this in the dev/newton branch before merging things in.

#
# SPDX-License-Identifier: BSD-3-Clause

"""PhysX Manager for Isaac Lab.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would likely be the OV manager, since ovphysx will probably have a different set of APIs

from .simulation_context import SimulationContext


class Interface(ABC):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does feel maybe a bit too abstracted, perhaps we can just combine the interface idea into the SimulationContext?

we can probably go with the approach we talked about today where we design the classes with interface in mind, but flatten them out when we do the implementation.

#
# SPDX-License-Identifier: BSD-3-Clause

"""Visualizer interface for SimulationContext."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be good for @matthewtrepte to provide feedback for the visualizers

from .legacy import * # noqa: F401, F403
from .prims import * # noqa: F401, F403
from .queries import * # noqa: F401, F403
from .semantics import * # noqa: F401, F403
from .stage import * # noqa: F401, F403
from .transforms import * # noqa: F401, F403


def raise_callback_exception_if_any() -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's a better way to handle the exceptions if we follow our own callback system? I think this was kind of a hacky way we had to do to force exceptions to be propagated from the OV callbacks

# Monkey-patch Isaac Sim's PhysxManager to use Isaac Lab's implementation
# This ensures all code (including Isaac Sim internals) uses our manager
try:
import isaacsim.core.simulation_manager as _isaacsim_sim_manager
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm...this feels a bit scary haha, is there any way we can avoid referencing Isaac Sim's SimulationManager all together?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we want to avoid cases where there is isaacsim manager and isaaclab manager, since both are singeton, just like we point isaaclab stage as isaacsim stage x)

raise
finally:
if not sim.has_gui():
# Stop simulation only if we aren't rendering otherwise the app will hang indefinitely
if not sim.get_setting("/isaaclab/has_gui"):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is the has_gui flag important for non-OV workflows as well?

#
# SPDX-License-Identifier: BSD-3-Clause

"""Newton OpenGL Visualizer implementation."""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's sync with @matthewtrepte on the visualizer classes since he's been looking at integrating these with the PhysX backend.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can probably also bring things in piece by piece so we can keep this PR somewhat smaller

@ooctipus ooctipus force-pushed the feature/simulation-manager branch from 28009e4 to 2fa5656 Compare February 5, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request isaac-lab Related to Isaac Lab team isaac-mimic Related to Isaac Mimic team isaac-sim Related to Isaac Sim team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants