Fix macOS mjpython launcher to suppoer show_{left,right}_ui.
PiperOrigin-RevId: 572377315 Change-Id: Iee734a6e49821b42e94dc19d9ed92a45ee605ea7
This commit is contained in:
committed by
Copybara-Service
parent
a84499e904
commit
7e549495d9
@@ -115,12 +115,27 @@ class _MjPythonImpl(mujoco.viewer._MjPythonBase):
|
||||
self._termination = self.__class__.NOT_TERMINATED
|
||||
self._busy = False
|
||||
|
||||
def launch_on_ui_thread(self, model, data, handle_return, key_callback):
|
||||
def launch_on_ui_thread(
|
||||
self,
|
||||
model,
|
||||
data,
|
||||
handle_return,
|
||||
key_callback,
|
||||
show_left_ui,
|
||||
show_right_ui,
|
||||
):
|
||||
with self._cond:
|
||||
if self._busy or self._task is not None:
|
||||
raise RuntimeError('another MuJoCo viewer is already open')
|
||||
else:
|
||||
self._task = (model, data, handle_return, key_callback)
|
||||
self._task = (
|
||||
model,
|
||||
data,
|
||||
handle_return,
|
||||
key_callback,
|
||||
show_left_ui,
|
||||
show_right_ui,
|
||||
)
|
||||
self._cond.notify()
|
||||
|
||||
def terminate(self):
|
||||
|
||||
Reference in New Issue
Block a user