Commit 52ee2e95 authored by Antoine RICHARD's avatar Antoine RICHARD Committed by Kelly Guo

Improves Kit load time with SurfaceGripper. (#483)

# Description

Improved Kit load time with SurfaceGripper by loading the extension only
if a SurfaceGripper is initialized.

## Type of change

- Bug fix (non-breaking change which fixes an issue)


## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] 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
parent 7af75de2
...@@ -192,7 +192,6 @@ enabled=true # Enable this for DLSS ...@@ -192,7 +192,6 @@ enabled=true # Enable this for DLSS
"isaacsim.core.cloner" = {} "isaacsim.core.cloner" = {}
"isaacsim.core.utils" = {} "isaacsim.core.utils" = {}
"isaacsim.core.version" = {} "isaacsim.core.version" = {}
"isaacsim.robot.surface_gripper" = {}
######################## ########################
# Isaac Lab Extensions # # Isaac Lab Extensions #
......
...@@ -27,7 +27,6 @@ keywords = ["experience", "app", "usd"] ...@@ -27,7 +27,6 @@ keywords = ["experience", "app", "usd"]
"isaacsim.robot.manipulators" = {} "isaacsim.robot.manipulators" = {}
"isaacsim.robot.policy.examples" = {} "isaacsim.robot.policy.examples" = {}
"isaacsim.robot.schema" = {} "isaacsim.robot.schema" = {}
"isaacsim.robot.surface_gripper" = {}
"isaacsim.robot.wheeled_robots" = {} "isaacsim.robot.wheeled_robots" = {}
"isaacsim.sensors.camera" = {} "isaacsim.sensors.camera" = {}
"isaacsim.sensors.physics" = {} "isaacsim.sensors.physics" = {}
......
...@@ -8,15 +8,19 @@ from __future__ import annotations ...@@ -8,15 +8,19 @@ from __future__ import annotations
import torch import torch
import warnings import warnings
import weakref import weakref
from typing import TYPE_CHECKING
import omni.timeline import omni.timeline
from isaacsim.core.simulation_manager import IsaacEvents, SimulationManager from isaacsim.core.simulation_manager import IsaacEvents, SimulationManager
from isaacsim.core.utils.extensions import enable_extension
from isaacsim.core.version import get_version from isaacsim.core.version import get_version
from isaacsim.robot.surface_gripper import GripperView
import isaaclab.sim as sim_utils import isaaclab.sim as sim_utils
from isaaclab.assets import AssetBase from isaaclab.assets import AssetBase
if TYPE_CHECKING:
from isaacsim.robot.surface_gripper import GripperView
from .surface_gripper_cfg import SurfaceGripperCfg from .surface_gripper_cfg import SurfaceGripperCfg
...@@ -266,6 +270,9 @@ class SurfaceGripper(AssetBase): ...@@ -266,6 +270,9 @@ class SurfaceGripper(AssetBase):
Use `--device cpu` to run the simulation on CPU. Use `--device cpu` to run the simulation on CPU.
""" """
enable_extension("isaacsim.robot.surface_gripper")
from isaacsim.robot.surface_gripper import GripperView
# Check that we are using the CPU backend. # Check that we are using the CPU backend.
if self._device != "cpu": if self._device != "cpu":
raise Exception( raise Exception(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment