Explain why mjpython is needed on MacOS

PiperOrigin-RevId: 776500649
Change-Id: Ifc4c944284f541cdb3a7027365ee27caaee39731
This commit is contained in:
Matija Kecman
2025-06-27 03:00:17 -07:00
committed by Copybara-Service
parent 09f7154e57
commit 09f44b3c92
+5 -5
View File
@@ -90,11 +90,11 @@ code to continue execution. In this mode, the user's script is responsible for t
and mouse-drag perturbations will not work unless the user explicitly synchronizes incoming events.
.. warning::
On MacOS, ``launch_passive`` requires that the user script is executed via a special ``mjpython`` launcher.
The ``mjpython`` command is installed as part of the ``mujoco`` package, and can be used as a drop-in replacement
for the usual ``python`` command and supports an identical set of command line flags and arguments. For example,
a script can be executed via ``mjpython my_script.py``, and an IPython shell can be launched via
``mjpython -m IPython``.
On MacOS, ``launch_passive`` requires that the user script is executed via a special ``mjpython`` launcher, this is
needed to circumvent a platform limitation which requires the main thread to be one that does the rendering. The
``mjpython`` command is installed as part of the ``mujoco`` package, and can be used as a drop-in replacement for the
usual ``python`` command and supports an identical set of command line flags and arguments. For example, a script can
be executed via ``mjpython my_script.py``, and an IPython shell can be launched via ``mjpython -m IPython``.
The ``launch_passive`` function returns a handle which can be used to interact with the viewer. It has the following
attributes: