Also:
- Packages MuJoCo Studio as MuJoCoStudio.app in the MuJoCo.dmg.
- Fixes a Filament compile issue.
- Patches libwebp to fix compile error related to universal builds and forces
it to build as static.
- Removes the separate, obsolete "build_studio" step.
PiperOrigin-RevId: 934564785
Change-Id: I50c83283b5e138062e37d53926a5a77fdf99dbfa
For example when loading parent_merge.xml:
```
WARNING: Attach conflict when attaching 'child' to 'parent_merge', policy is 'merge'
timestep: parent has 0.005, child has 0.002, taking the minimum
iterations: parent has 50, child has 100, taking the maximum
flag 'Damper': added from child
```
When loading parent_error.xml:
```
XML Error: Attach conflict when attaching 'child' to 'parent_error', policy is 'error'
timestep: parent has 0.005, child has 0.002
iterations: parent has 50, child has 100
Element 'attach', line 10
```
PiperOrigin-RevId: 933620810
Change-Id: Ib477863b5ef763474d27fb4be5a4148be1d5d500
CMake adds the imported mujoco target's include dir as -isystem, so with
system_headers sloppiness ccache stopped hashing the public MuJoCo headers.
A header-only change (new mjData field, new enum value) then went undetected
and ccache reused objects compiled against the old struct layout, yielding an
ABI-mismatched binding: wrong field offsets (garbage in struct/pickle tests),
stale mjENABLESTRING/mjNENABLE, and mjSpec-vs-mjData signature mismatches.
Removing system_headers makes ccache hash these headers and recompile on
change. The mtime/ctime flags stay (they absorb pip's per-run temp-dir churn
without affecting content detection).
Compiler warnings are now accumulated in a vector of strings within the mjSpec object. New API functions `mjs_numWarnings` and `mjs_getWarning` are added to access these warnings. The compiler's log handler now chains warnings to the global log handler, ensuring they are still displayed immediately. Call sites in `mj_loadXML`, `mj_compile`, and the Python and WASM bindings have been updated to use the new warning API.
PiperOrigin-RevId: 933361650
Change-Id: I47cab98a460c57b0898c0a1a43fce2a5b9648eb1
--
8ce7d8199ace95d0f429b0ca9169d290d167cee1 by Anas <anaselghoudane@gmail.com>:
Use box midpoint to choose finite-difference direction in jacobian_fd
When bounds are provided, `jacobian_fd` chooses each coordinate's
finite-difference direction so the perturbation steps away from the nearer
bound. It compared `x` against `0.5 * (bounds[1] - bounds[0])`, which is half
the box *width*, not the box midpoint. For bounds that are not centered on the
origin this selects the wrong direction, and at the lower bound the perturbation
steps outside the box.
Compare against the midpoint `0.5 * (bounds[0] + bounds[1])` instead. Adds a
regression test checking that all residual evaluations stay within an off-center
box when `x` is at the lower bound; it fails before this change and passes after.
--
cfa085484c30df808362898e322de8adc6660b59 by Kevin Zakka <kevinarmandzakka@gmail.com>:
Expand jacobian_fd bounds test and avoid midpoint overflow
Use the distributive form `0.5*lo + 0.5*hi` instead of
`0.5*(lo+hi)` to avoid overflow for extreme bound values.
Expand the single-case test into a parameterized subTest covering
all four boundary positions (lower/upper of positive and negative
off-center boxes), and rename it to `test_jacobian_fd_respects_bounds`.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/3301 from Nas01010101:fix/minimize-fd-box-midpoint cfa085484c30df808362898e322de8adc6660b59
PiperOrigin-RevId: 933224876
Change-Id: I833cfe3324876cdeb7ca680c23d1d8a4d16adcf1
Switch MJX DataJAX to use the CSR-format `M` as its primary sparse inertia representation, matching MuJoCo C `mjData.M`. This allows both `mjData.qM` and `mjModel.mapM2M` to be deleted in the future.
PiperOrigin-RevId: 932433465
Change-Id: I194ffbfdba0cdd9c718277ee0d5de7ac20f2b06f
Correct argument types for timeconst and range parameters in pybind11
python bindings from C arrays to std::array.
Fixes#3282, #3282, #3318
Thanks to @Abzaek for original PRs
PiperOrigin-RevId: 932423401
Change-Id: Ic30ba076913693f5c0e545789690e8b0fa444390
Allows other files (e.g. mjrfilament) to define functions that
will be added to the introspection output.
PiperOrigin-RevId: 932403177
Change-Id: Ie2d2c6be67f0706463fdec4fc498364125e05dad
- Move SimToView and ViewToSim dataclasses from async.py to viewer_protocol.py (adding a user_data field) to consolidate IPC protocol definitions.
- Remove the simulated Network class and latency UI controls from async.py to simplify the example and focus on core multiprocessing communication.
- Use parser.parse() in main() for cleaner and more direct MuJoCo model loading.
- Add cancel_join_thread() to multiprocessing queues and a join timeout to prevent atexit handlers from blocking during process shutdown.
PiperOrigin-RevId: 932327625
Change-Id: If91777dba934814b3f9faa17f9055869920575d7
Widen mju_error_msg buffer from 1024 to 2048 and replace strncpy with
snprintf to avoid -Wformat-truncation and -Wstringop-truncation.
PiperOrigin-RevId: 930982013
Change-Id: I0fcd726e5ed1ad28594bd4ef55b8b1ae72020043