- When `mjData.nefc` was 0 (solver not run at all), we were plotting the stale diagnostics from the last run; now fixed.
- In the case where islands were used, the semantic of the plotted diagnostic `sqrt_nnz` (square root of Hessian nonzeros) is changed. It used to be the sum of square roots of solver nonzeros per island, it is now the square root of the sum of all nonzeros in all islands. The semantic `sqrt(sum(nnz_i))` was found to be more consistent than `sum(sqrt(nnz_i))`, in the sense that switching islanding on/off leads to smaller changes and is more in line with the interpretation of islanding as [block-diagonalization](https://mujoco.readthedocs.io/en/3.3.7/computation/#constraint-islands).
PiperOrigin-RevId: 827624908
Change-Id: I5fc86364ead585a4752a6d44823fb75cf6c7c318
Since we don't do any on demand data loading for USD and always convert everything it should be safe to use the SdfLayer API instead of the SdfAbstractData API. This enables other codepaths such as the USD writer class to reuse the same logic to generate USD specification from an mjSpec.
PiperOrigin-RevId: 827431722
Change-Id: I60a581e0c9577164a4a66229ea9dcb8912afcf74
- plugin system similar to mjpResourceProvider, but instead of loading a resource it converts an existing mjResource into an mjSpec.
- The returned spec is then composed into the referencing spec.
- This enables different file types to generate arbitrary specs, and allows us to separate format parsing from compilation code.
Follow up CLs will move some of the logic in src/engine for PNG, USD, KTX, OBJ loading into decoders.
The mj_parse function MjSpec from a given file, it's a more generic version of mj_parseXML.
In it's implementation, mj_parse as opposed to mj_parseXML will look for any registered decoder and
not assume we are striclty dealing with MJCF.
PiperOrigin-RevId: 826149497
Change-Id: I0ece26904280cb94bd5ded6dd5a565c539d60254
`xfrc_applied` mostly contains user perturbations which are rare. It is very often identically zero and for large arrays `mju_isZeroByte` is significantly faster than `mju_isZero`.
PiperOrigin-RevId: 824975356
Change-Id: Iadb1d300d68cf12de00c14a0665bd89924a2d7e0
This includes the filament, toolbox, and studio projects.
Adds a MUJOCO_BUILD_STUDIO option to enable building of the `studio` app (disabled by default).
Adds a MUJOCO_USE_FILAMENT to allow the studio app to use the filament rendering backend. A separate MUJOCO_USE_FILAMENT_VULKAN flag can be used to enable vulkan rendering.
PiperOrigin-RevId: 824602367
Change-Id: I26d46c16211ae2118f96c163c4194fea5b5a15a9
This ensures that at e.g. the barycenter of the triangle each vertex has weight 1/3, as one would expect with barycentric coordinates, rather than 1/sqrt(3). This makes it consistent to the finite element interpolation used in the passive elastic forces.
PiperOrigin-RevId: 823458736
Change-Id: Ia5c02cba186a80612de38402f791695c33e991ab
The smaller size is a warning/error on some targets:
```
error: ‘ bytes’ directive output may be truncated writing 6 bytes into a region of size between 0 and 15
```
PiperOrigin-RevId: 823047552
Change-Id: Id66b5828cf84a512dffc452753f1881deb685584
This function allows the caller to extract a subset of components of a state previously obtained via `mj_getState` without having to first write it back into `mjData`.
PiperOrigin-RevId: 822165077
Change-Id: I6433261f4f5ec2e8d024bb7dee8f7dbf1e62666c
This is a more general API in preparation of a higher interpolation order
PiperOrigin-RevId: 820174741
Change-Id: I81bd52ab44e0485d72579e21d1c8a48a1b35ec3f
This is strictly an out array and should not be read before it is written to. This change improves MSAN coverage of engine code.
PiperOrigin-RevId: 819767673
Change-Id: I57500c8147f4774d326cf87ea3bac5420e4dd54d
*** Reason for rollback ***
BEGIN_PUBLIC
Holding off on a minor version bump until the next release.
*** Original change description ***
#mujoco update the version to 3.4.0 ahead of the 3.4.0 release.
Bump the version to 3.4.0 ahead of the next release.
***
PiperOrigin-RevId: 818748143
Change-Id: I722e9beb80c61a48bd997da6a1840777a81d5036
The truth is that all these solver-related values should be moved out of `mjContact` altogether, but that can be done in a future followup.
PiperOrigin-RevId: 818624976
Change-Id: I5b9e63927098cdf26b9f8acfdd9d86e75d6ce331
An earlier refactor incorrectly assumed that only selected bodies needed
labels.
PiperOrigin-RevId: 818568645
Change-Id: I7aea07c5342673dd589e1891d0db1f2b0c489fe4
This is intended as a drop-in replacement for mjr_render to enable high
quality, physically-based rendering (PBR) using the filament render engine.
This is a work-in-progress and, as such, some features may be missing. This
is also a code-only drop; build files (including instructions on how to
generate the filament materials) will be provided at a later date.
This library is intended to be run with the experimental studio app.
PiperOrigin-RevId: 817593684
Change-Id: Ib9cd14c1881e4897c1111275bd749aa38ebb5317
Also, unify the meaning of fitting a geom to an AABB: it now means to find the smallest geom such that its AABB contains the mesh AABB.
Fixes#2881.
PiperOrigin-RevId: 817097544
Change-Id: I883c686feffa803bd16ba461db24a474dfec7712
Previously this was just used for the USDA file format token, which we can confidently just construct ourselves.
Since [this PR in OpenUSD](https://github.com/PixarAnimationStudios/OpenUSD/commit/5bb9ad1fb2a034e1f9b48c7db936f296b5b78e25) the file lives in a different place now and public usage will be deprecated anyways.
PiperOrigin-RevId: 816801204
Change-Id: I42e92d2af52b0f9ff0a679ecb96f3d2dbf623531