Skip to content

Commit aa04e7b

Browse files
committed
Set deadline-paced teleop retargeting by default
Use DeadlinePacingConfig for pipelined retargeting so IsaacTeleop work is scheduled closer to when IsaacLab consumes the action. This reduces Python GIL contention during the start of simulation step and improves overlap with rendering, which can lower end-to-end teleoperation latency.
1 parent c5a3736 commit aa04e7b

4 files changed

Lines changed: 21 additions & 8 deletions

File tree

source/isaaclab_teleop/changelog.d/hougantc-pipelined-retargeting.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ Changed
88
^^^^^^^
99

1010
* Changed :class:`~isaaclab_teleop.IsaacTeleopCfg` to enable IsaacTeleop
11-
pipelined retargeting by default when supported by the installed
12-
IsaacTeleop version. Set
11+
deadline-paced pipelined retargeting by default when supported by the
12+
installed IsaacTeleop version. This returns the latest completed retargeting
13+
output while the current frame is submitted, using
14+
``DeadlinePacingConfig(safety_margin_s=0.025)`` to sample close to
15+
the next simulation consumption point. Set
1316
``retargeting_execution=RetargetingExecutionConfig(mode="sync")`` to restore
1417
exact current-frame retargeting.

source/isaaclab_teleop/docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ rendering without blocking.
120120
| `retargeters_to_tune` | `Callable[[], list[BaseRetargeter]] \| None` | `None` | Retargeters to expose in the tuning UI |
121121
| `plugins` | `list[PluginConfig]` | `[]` | IsaacTeleop plugin configurations |
122122
| `sim_device` | `str` | `"cuda:0"` | Torch device for output action tensors |
123-
| `retargeting_execution` | `RetargetingExecutionConfig \| None` | `mode="pipelined"` when supported | IsaacTeleop retargeting execution settings |
123+
| `retargeting_execution` | `RetargetingExecutionConfig \| None` | `mode="pipelined", pacing=DeadlinePacingConfig(safety_margin_s=0.025)` when supported | IsaacTeleop retargeting execution settings |
124124
| `teleoperation_active_default` | `bool` | `False` | Whether teleoperation is active on session start |
125125
| `app_name` | `str` | `"IsaacLabTeleop"` | Application name for the IsaacTeleop session |
126126

source/isaaclab_teleop/isaaclab_teleop/isaac_teleop_cfg.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,22 @@
3131

3232

3333
try:
34-
from isaacteleop.teleop_session_manager import RetargetingExecutionConfig as _RetargetingExecutionConfig
34+
import isaacteleop.teleop_session_manager as _tsm
3535

3636
_RETARGETING_EXECUTION_SUPPORTED = True
3737
except ImportError:
38-
_RetargetingExecutionConfig = None
38+
_tsm = None
3939
_RETARGETING_EXECUTION_SUPPORTED = False
4040

4141

4242
def _default_retargeting_execution_config() -> Any | None:
4343
"""Build Isaac Lab's default IsaacTeleop retargeting execution config."""
4444
if not _RETARGETING_EXECUTION_SUPPORTED:
4545
return None
46-
return _RetargetingExecutionConfig(mode="pipelined")
46+
return _tsm.RetargetingExecutionConfig(
47+
mode="pipelined",
48+
pacing=_tsm.DeadlinePacingConfig(safety_margin_s=0.025),
49+
)
4750

4851

4952
@configclass

source/isaaclab_teleop/test/test_cloudxr_lifecycle.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,17 @@ def _install_stubs():
7474
_stubs_installed[name] = MagicMock()
7575
sys.modules[name] = _stubs_installed[name]
7676

77+
@dataclass
78+
class DeadlinePacingConfig:
79+
safety_margin_s: float = 0.025
80+
7781
@dataclass
7882
class RetargetingExecutionConfig:
7983
mode: str = "sync"
84+
pacing: DeadlinePacingConfig | None = None
8085

8186
tsm = sys.modules["isaacteleop.teleop_session_manager"]
87+
tsm.DeadlinePacingConfig = DeadlinePacingConfig # type: ignore[attr-defined]
8288
tsm.RetargetingExecutionConfig = RetargetingExecutionConfig # type: ignore[attr-defined]
8389

8490

@@ -155,11 +161,12 @@ def test_profiles_are_in_same_directory(self):
155161
class TestRetargetingExecutionConfig:
156162
"""Tests for Isaac Lab's IsaacTeleop retargeting execution defaults."""
157163

158-
def test_cfg_defaults_to_pipelined_retargeting(self):
159-
"""Isaac Lab opts into IsaacTeleop pipelined retargeting by default."""
164+
def test_cfg_defaults_to_deadline_paced_pipelined_retargeting(self):
165+
"""Isaac Lab defaults to deadline-paced pipelined retargeting."""
160166
cfg = _make_cfg()
161167

162168
assert cfg.retargeting_execution.mode == "pipelined"
169+
assert cfg.retargeting_execution.pacing.safety_margin_s == 0.025
163170

164171
def test_cfg_defaults_to_none_with_legacy_isaacteleop(self):
165172
"""Older IsaacTeleop releases can still construct IsaacTeleopCfg."""

0 commit comments

Comments
 (0)