mjrRect is a common type that will be re-used across different
rendering APIs, not just mjr_ APIs.
PiperOrigin-RevId: 882620060
Change-Id: I7f77ac9298c52c454d94c46379ff5270fd833f26
The pybind for recompile was not releasing the GIL when it called mj_recompile, this can caused deadlocks with the
asset loading threads. For example if a resource provider was trying to call Python.
To resolve this the GIL is release just for the mj_recompile.
Addresses: https://github.com/google-deepmind/mujoco/issues/3118
The next release will include breaking changes, so this bumps the major
version to reflect that.
PiperOrigin-RevId: 881351265
Change-Id: I970c68a0211651c07fcb8109ebd0b138196cf50a
Hiding the dock icon after the viewer window closes triggers an
asynchronous screen/dock reconfiguration via SkyLight. Without
draining the main run loop, the resulting NSScreen invalidation
notification is dispatched to a GCD worker thread, which hits
NSScreen's main-thread assertion and crashes the process.
Drain the main NSRunLoop briefly after setActivationPolicy: so the
reconfiguration is processed on the main thread.
WaitForAtomicNoGil spins until the render loop consumes a pending
set_texts/set_figures/set_images request (atomic == expected). If the
user closes the viewer window after a request is submitted but before
the render loop consumes it, the render loop exits and the atomic is
never updated. The calling thread spins forever, preventing the
process from terminating.
Check exitrequest inside the spin loop so the wait bails out once the
viewer is shutting down.
- Detect linker type (lld-link vs ld) and use the appropriate stack flag: /STACK:16777216 for lld-link, --stack,16777216 for MinGW ld
- Filter out stack-related flags from Python binding modules to prevent crashes when loading MuJoCo as a DLL in Python
Fixes#3011
* Replace various MJOPTION_ macros with a single MJOPTION_FIELDS.
* Use XVEC macro to denote vector members where there is a mixture of
vector and scalar members in a given struct type.
* Split up MJVISUAL_FIELDS into separate macros for each substruct.
* Modify engine_print.c and Python bindings struct.h/cc to use the
new X macros.
PiperOrigin-RevId: 869760513
Change-Id: Idac4fe9aa99f0258e7c79802ca9023a0d4486e2d
This is to properly handle the case where the interpreter wants to exit immediately, e.g. when `mjpython --version` is run.
Currently, we call `PyGILState_Ensure` regardless of the result of `Py_InitializeFromConfig` resulting in a segfault, as in issue #2870.
PiperOrigin-RevId: 869652555
Change-Id: I3a898279eb8aa25afbaece904cfdcc4fdcc92972
--
4cabc9c52dc07ea2d64a3de6dbd58e47a2ad023c by Kevin Zakka <kevinarmandzakka@gmail.com>:
Add system identification tutorial and fix template packaging
- Add sysid tutorial notebook (sysid.ipynb)
- Include HTML templates in package-data to fix TemplateNotFound errors
when pip installing mujoco[sysid]
COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/3092 from kevinzakka:sysid-notebook 4cabc9c52dc07ea2d64a3de6dbd58e47a2ad023c
PiperOrigin-RevId: 868900119
Change-Id: I53c4cc94b5fb6f864c5cee589af9dfad9bfc8744
Adds a test which verifies that we can index into the texture buffer at offsets larger than can be represented by a 32-bit signed int.
PiperOrigin-RevId: 868756646
Change-Id: Ibc1a2b269fce41aec370611b0aab77803837e7a8
Resource operations (e.g. mju_openResource, mju_readResource, and
mju_closeResource, etc.) are now all handled by a VFS instance. It
is now up to the VFS to determine which provider to use in order to
handle those operations.
This allows us to dynamically add/remove (aka "mount") providers to
a VFS to handle special requests. mj_addFileVFS and mj_addBufferVFS
have been reimplemented as two such use-cases. Moreover, we expose
the mounting behaviour with two new functions: mj_mountVFS and
mj_unmountVFS.
PiperOrigin-RevId: 861550939
Change-Id: I070eb4bcc2982466c8f368f7918005538baa5185
Removed the GIL lock in set_figures, clear_figures, set_texts, clear_texts, set_images, and clear_images
PiperOrigin-RevId: 861245200
Change-Id: I52f21d82f9813752c7cb357213c24ea6188583db