Skip to content

Commit 1cb01b5

Browse files
committed
Cleanup: remove dead set_color(), remove on_sync no-op override
1 parent 5bb80ec commit 1cb01b5

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

src/mj_viser/teleop_panel.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,6 @@ def set_pose(self, pose_4x4: np.ndarray) -> None:
8888
self._handle.position = pose_4x4[:3, 3]
8989
self._handle.wxyz = xmat_to_wxyz(pose_4x4[:3, :3].flatten())
9090

91-
def set_color(self, rgb: tuple[int, int, int]) -> None:
92-
"""Change ghost color (for reachability feedback)."""
93-
# Viser doesn't support runtime color change on trimesh easily.
94-
# We'd need to remove and re-add. For now, skip — the gizmo itself
95-
# provides visual feedback. This is a placeholder for future
96-
# Viser API improvements.
97-
pass
98-
9991
def set_visible(self, visible: bool) -> None:
10092
"""Show or hide the ghost."""
10193
if self._handle is not None:
@@ -314,10 +306,8 @@ def _on_record(event) -> None:
314306
self._controller.start_recording()
315307
self._record_btn.name = "Stop Recording"
316308

317-
def on_sync(self, viewer: MujocoViewer) -> None:
318-
"""Called each frame by viewer.sync(). No-op — teleop stepping
319-
happens in _teleop_loop to avoid recursion (step → sync → on_sync)."""
320-
pass
309+
# on_sync intentionally not overridden — teleop stepping happens in
310+
# _teleop_loop thread to avoid recursion (step → sync → on_sync).
321311

322312
def _activate_teleop(self) -> None:
323313
# Clear any stale abort from Stop button

0 commit comments

Comments
 (0)