Skip to content

Commit bad225a

Browse files
committed
Check controller.is_active in teleop loop
1 parent 17183b3 commit bad225a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/mj_viser/teleop_panel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ def _deactivate_teleop(self) -> None:
347347
def _teleop_loop(self) -> None:
348348
"""Background loop: step controller + sync viewer at ~30 Hz."""
349349
dt = 1.0 / 30.0
350-
while self._is_teleop_active:
350+
while self._is_teleop_active and self._controller.is_active:
351351
t0 = time.monotonic()
352352
try:
353353
self._controller.step()

0 commit comments

Comments
 (0)