Skip to content

Commit d3ce34f

Browse files
committed
Deprecate the isaaclab.devices keyboard, gamepad and SpaceMouse devices
Se2/Se3Keyboard, Se2/Se3Gamepad and Se2/Se3SpaceMouse now emit a DeprecationWarning pointing to the isaaclab_teleop builders that replace them. Their configs are not deprecated: environments keep declaring their devices with them, and the teleop scripts run those through the equivalent Isaac Capture pipeline when isaacteleop is installed.
1 parent 767bd29 commit d3ce34f

12 files changed

Lines changed: 70 additions & 5 deletions
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
* Deprecated :class:`~isaaclab.devices.Se2Keyboard`, :class:`~isaaclab.devices.Se3Keyboard`,
2+
:class:`~isaaclab.devices.Se2Gamepad`, :class:`~isaaclab.devices.Se3Gamepad`,
3+
:class:`~isaaclab.devices.Se2SpaceMouse` and :class:`~isaaclab.devices.Se3SpaceMouse`; their
4+
constructors now emit a :class:`DeprecationWarning`. Use the ``isaaclab_teleop`` builders
5+
instead (:func:`~isaaclab_teleop.se3_keyboard_teleop_cfg`,
6+
:func:`~isaaclab_teleop.se3_gamepad_teleop_cfg`, :func:`~isaaclab_teleop.se3_spacemouse_teleop_cfg`
7+
and their SE(2) counterparts), which run the device through Isaac Capture. The device
8+
configs (:class:`~isaaclab.devices.Se3KeyboardCfg`, ...) are not deprecated: the teleop scripts
9+
run an environment's ``teleop_devices`` entries through the equivalent Isaac Capture pipeline
10+
when the ``isaacteleop`` package is installed, and through these devices otherwise.

‎source/isaaclab/changelog.d/rwiltz-teleop-scripts-isaac-capture.minor‎

Whitespace-only changes.

‎source/isaaclab/isaaclab/devices/gamepad/__init__.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
#
44
# SPDX-License-Identifier: BSD-3-Clause
55

6-
"""Gamepad device for SE(2) and SE(3) control."""
6+
"""Gamepad device for SE(2) and SE(3) control.
7+
8+
.. deprecated::
9+
Use :func:`isaaclab_teleop.se2_gamepad_teleop_cfg` / :func:`isaaclab_teleop.se3_gamepad_teleop_cfg`, which run
10+
the device in process through Isaac Capture. Imports from this package keep working;
11+
the device constructors emit a :class:`DeprecationWarning`.
12+
"""
713

814
from ...utils.module import lazy_export
915

‎source/isaaclab/isaaclab/devices/gamepad/se2_gamepad.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from __future__ import annotations
99

10+
import warnings
1011
import weakref
1112
from collections.abc import Callable
1213
from typing import TYPE_CHECKING
@@ -55,6 +56,11 @@ def __init__(self, cfg: Se2GamepadCfg):
5556
Args:
5657
cfg: Configuration object for gamepad settings.
5758
"""
59+
warnings.warn(
60+
"Se2Gamepad is deprecated. Please use isaaclab_teleop.se2_gamepad_teleop_cfg instead.",
61+
DeprecationWarning,
62+
stacklevel=2,
63+
)
5864
# turn off simulator gamepad control
5965
get_settings_manager().set("/persistent/app/omniverse/gamepadCameraControl", False)
6066
# store inputs

‎source/isaaclab/isaaclab/devices/gamepad/se3_gamepad.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from __future__ import annotations
99

10+
import warnings
1011
import weakref
1112
from collections.abc import Callable
1213
from typing import TYPE_CHECKING
@@ -62,6 +63,11 @@ def __init__(self, cfg: Se3GamepadCfg):
6263
Args:
6364
cfg: Configuration object for gamepad settings.
6465
"""
66+
warnings.warn(
67+
"Se3Gamepad is deprecated. Please use isaaclab_teleop.se3_gamepad_teleop_cfg instead.",
68+
DeprecationWarning,
69+
stacklevel=2,
70+
)
6571
# turn off simulator gamepad control
6672
get_settings_manager().set("/persistent/app/omniverse/gamepadCameraControl", False)
6773
# store inputs

‎source/isaaclab/isaaclab/devices/keyboard/__init__.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
#
44
# SPDX-License-Identifier: BSD-3-Clause
55

6-
"""Keyboard device for SE(2) and SE(3) control."""
6+
"""Keyboard device for SE(2) and SE(3) control.
7+
8+
.. deprecated::
9+
Use :func:`isaaclab_teleop.se2_keyboard_teleop_cfg` / :func:`isaaclab_teleop.se3_keyboard_teleop_cfg`, which run
10+
the device in process through Isaac Capture. Imports from this package keep working;
11+
the device constructors emit a :class:`DeprecationWarning`.
12+
"""
713

814
from ...utils.module import lazy_export
915

‎source/isaaclab/isaaclab/devices/keyboard/se2_keyboard.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from __future__ import annotations
99

10+
import warnings
1011
import weakref
1112
from collections.abc import Callable
1213
from typing import TYPE_CHECKING
@@ -53,6 +54,11 @@ def __init__(self, cfg: Se2KeyboardCfg):
5354
Args:
5455
cfg: Configuration object for keyboard settings.
5556
"""
57+
warnings.warn(
58+
"Se2Keyboard is deprecated. Please use isaaclab_teleop.se2_keyboard_teleop_cfg instead.",
59+
DeprecationWarning,
60+
stacklevel=2,
61+
)
5662
# store inputs
5763
self.v_x_sensitivity = cfg.v_x_sensitivity
5864
self.v_y_sensitivity = cfg.v_y_sensitivity

‎source/isaaclab/isaaclab/devices/keyboard/se3_keyboard.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
from __future__ import annotations
99

10+
import warnings
1011
import weakref
1112
from collections.abc import Callable
1213
from typing import TYPE_CHECKING
@@ -61,6 +62,11 @@ def __init__(self, cfg: Se3KeyboardCfg):
6162
Args:
6263
cfg: Configuration object for keyboard settings.
6364
"""
65+
warnings.warn(
66+
"Se3Keyboard is deprecated. Please use isaaclab_teleop.se3_keyboard_teleop_cfg instead.",
67+
DeprecationWarning,
68+
stacklevel=2,
69+
)
6470
# store inputs
6571
self.pos_sensitivity = cfg.pos_sensitivity
6672
self.rot_sensitivity = cfg.rot_sensitivity

‎source/isaaclab/isaaclab/devices/spacemouse/__init__.py‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
#
44
# SPDX-License-Identifier: BSD-3-Clause
55

6-
"""Spacemouse device for SE(2) and SE(3) control."""
6+
"""Spacemouse device for SE(2) and SE(3) control.
7+
8+
.. deprecated::
9+
Use :func:`isaaclab_teleop.se2_spacemouse_teleop_cfg` / :func:`isaaclab_teleop.se3_spacemouse_teleop_cfg`, which run
10+
the device in process through Isaac Capture. Imports from this package keep working;
11+
the device constructors emit a :class:`DeprecationWarning`.
12+
"""
713

814
from ...utils.module import lazy_export
915

‎source/isaaclab/isaaclab/devices/spacemouse/se2_spacemouse.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import threading
1111
import time
12+
import warnings
1213
from collections.abc import Callable
1314
from typing import TYPE_CHECKING
1415

@@ -52,6 +53,11 @@ def __init__(self, cfg: Se2SpaceMouseCfg):
5253
Args:
5354
cfg: Configuration for the spacemouse device.
5455
"""
56+
warnings.warn(
57+
"Se2SpaceMouse is deprecated. Please use isaaclab_teleop.se2_spacemouse_teleop_cfg instead.",
58+
DeprecationWarning,
59+
stacklevel=2,
60+
)
5561
# listener thread, started once the device is found
5662
self._thread = None
5763
# store inputs

0 commit comments

Comments
 (0)