Pedro Morais
0a6b631d4b
Make change non-breaking per haroonq's feedback
2026-07-15 11:53:22 -04:00
Pedro Morais
d43c3ed426
Move texture block copy out of render context so it can be modified online via mjmodel
2026-07-09 11:08:43 -04:00
Omar Rayyan
040872fd65
Copybara import of the project:
...
--
a5221e754c88580d103bfc7bfaf1ed32927ca499 by omar rayyan <olr7742@nyu.edu >:
Fix .mjz loading in simulate
COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/3384 from omarrayyann:fix-mjz-simulate a5221e754c88580d103bfc7bfaf1ed32927ca499
PiperOrigin-RevId: 944573851
Change-Id: Ifba77ee9f9b97a7d8c0b0a47ac82d390a273672b
2026-07-08 10:30:54 -07:00
Yuval Tassa
1ea2d884d2
Change mju_round to use standard round() function.
...
PiperOrigin-RevId: 942873144
Change-Id: I3fd0d630643c104ff464d619387ff36582c2a5d8
2026-07-05 10:48:13 -07:00
Yuval Tassa
315bcfbf3a
Remove mjData.qM
...
PiperOrigin-RevId: 942520660
Change-Id: I422358e299ca0fcfe4c49cd0ee90c014a4c319d7
2026-07-04 09:38:45 -07:00
Yuval Tassa
7e9ac58ff9
Migrate mjd_inverseFD mass Jacobian from qM to M
...
PiperOrigin-RevId: 942268237
Change-Id: I0ecfe161867ce9930cd6366d778077df2cd3197f
2026-07-03 15:35:52 -07:00
Yuval Tassa
5618666a7d
Add body/simple attribute to control simple body optimization.
...
PiperOrigin-RevId: 942164766
Change-Id: I1e83bb99b6a1955917eb9b2e9bed0dc7b8e6a161
2026-07-03 09:09:30 -07:00
Yuval Tassa
14c0b0c92b
Recompute sameframe flags in mj_setConst.
...
The `body_sameframe`, `geom_sameframe`, and `site_sameframe` flags are now recomputed within `mj_setConst` based on the current model geometry. This allows these flags to be updated if the model's body/geom/site frames are modified after the initial compilation. Tests are added to verify the correct recomputation and its effect on forward kinematics. The compiler also checks that its initial computation matches the result of `mj_setConst`.
Fixes #3029 , #1628 .
PiperOrigin-RevId: 941758649
Change-Id: I7b995f8c67ad305bca5b52732436ba578c905d73
2026-07-02 10:49:00 -07:00
Yuval Tassa
2d283b5e9d
Allow self-attach in MJCF
...
PiperOrigin-RevId: 941676717
Change-Id: I9ff8fc89716bc14b438a41e2b4075bbe5fdb83cf
2026-07-02 06:51:46 -07:00
Sam Haves
4e1795b9a4
Add special case support for MJB and TXT files to mj_encode.
...
PiperOrigin-RevId: 939875974
Change-Id: I57fc753871b348a7f6342aca0a892e74acb74173
2026-06-29 09:32:50 -07:00
Sam Haves
d83ef0b6b9
Change mj_encode return type to 64-bit (mjtSize)
...
This supports encoding files larger than 2GB.
PiperOrigin-RevId: 939828697
Change-Id: If60d36c61475ced20b4eb58408ffb37e25bf3db7
2026-06-29 07:41:52 -07:00
Yuval Tassa
c499f7f2b0
Add Nesterov momentum with O'Donoghue-Candès restarts to PGS solver (~2x speedup)
...
Benchmark on `2humanoid100.xml` (nefc=1785, nv=654):
```
Convergence at fixed iteration count (mean relative error vs Newton):
20 iters: 2.98e-03 vs 1.54e-02 (5.2x better)
40 iters: 8.14e-05 vs 2.60e-03 (32x better)
80 iters: 1.17e-07 vs 1.77e-04 (1500x better)
Pipeline throughput (tolerance=1e-8, islands disabled):
Nesterov: 243 steps/s, 46 iters/step
Baseline: 151 steps/s, 95 iters/step
Solver speedup: 1.8x, overall step speedup: 1.6x
Pipeline throughput (tolerance=1e-8, islands enabled):
Nesterov: 306 steps/s, 442 iters/step
Baseline: 175 steps/s, 966 iters/step
Solver speedup: 2.1x, overall step speedup: 1.7x
```
PiperOrigin-RevId: 936610759
Change-Id: I2978e8bd545971d9151005623967e5cf0ad125cc
2026-06-23 05:52:14 -07:00
Michael Moss
28009f9105
Update changelog for the 3.10.0 release.
...
PiperOrigin-RevId: 936044016
Change-Id: I4b6e3205819b7bd0469415fe0b57990b68309d1b
2026-06-22 07:22:23 -07:00
Kevin Zakka
a8eaccd2b6
Copybara import of the project:
...
--
6ab68a057443f038a3d844807f205b1c99cab944 by Kevin Zakka <kevinarmandzakka@gmail.com >:
Fix pickle code-execution vulnerability in sysid loaders
Serialize signal_mapping as JSON so the trajectory and time series loaders can use allow_pickle=False, preventing arbitrary code execution from untrusted .npz files.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google-deepmind/mujoco/pull/3353 from kevinzakka:sysid-disable-pickle-load 6ab68a057443f038a3d844807f205b1c99cab944
PiperOrigin-RevId: 935400242
Change-Id: Iecd907174441fbcfd02c106b912a7ff375c9098c
2026-06-20 15:10:54 -07:00
Kevin Zakka
b1e3753a1a
Fix typo in github username in changelog.
...
PiperOrigin-RevId: 935244857
Change-Id: I33159f2caa765be585e46cb1b8ccc8e37f103de3
2026-06-20 03:22:50 -07:00
Yuval Tassa
410c73168c
Add policies for global attribute conflict resolution upon attach
...
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
2026-06-17 03:36:10 -07:00
Yuval Tassa
6f8bb5ef55
Refactor compiler warning handling.
...
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
2026-06-16 16:28:33 -07:00
Yuval Tassa
58f6d52491
Introduce new logging API, fixes #858
...
PiperOrigin-RevId: 930744288
Change-Id: I6ec1203b55c031390f3eef23192e2337508ce886
2026-06-11 14:36:57 -07:00
Yuval Tassa
986d73c062
Fix non-unit normals in mesh convex hull compiler.
...
PiperOrigin-RevId: 928777934
Change-Id: I43d7adcf4c5781b57f0af9805a8ce01ebc2e3872
2026-06-08 14:40:11 -07:00
Yuval Tassa
828052e6f4
CG solver: Replace PRP+ with Hager-Zhang update
...
Replace the Polak-Ribière-Plus (PRP+) conjugate direction update with the Hager-Zhang formula in `mj_solPrimal`.
While this change has negligible effect under float64, it leads to a significant 17.5% throughput speedup over PRP+ under float32 (measured via `engine_cg_convergence_test`). This performance gain is driven by:
* A 9.4% reduction in CG iterations per step.
* A 12.1% reduction in line search evaluations per step.
The full output of the comparison is
```
================================================================
1/4: HZ + float64
================================================================
CG Convergence: 2humanoid100.xml
1000 Newton steps, 100 evaluation points
nv = 654, nq = 756
metric: ||qacc_cg - qacc_newton|| / ||qacc_newton||
Warmstart (tolerance = 0):
Iters | Mean Err | Max Err | Mean Iters | LS evals
-------+-------------+-------------+------------+---------
5 | 3.8532e-01 | 1.4285e+00 | 5.00 | 22368
10 | 2.0809e-01 | 9.9315e-01 | 10.00 | 44591
20 | 6.4977e-02 | 2.3410e-01 | 20.00 | 89417
40 | 5.2839e-03 | 2.1916e-02 | 40.00 | 180984
80 | 3.9709e-05 | 3.0010e-04 | 80.00 | 364241
160 | 3.2498e-09 | 3.5480e-08 | 160.00 | 730131
-------+-------------+-------------+------------+---------
No warmstart (tolerance = 0):
Iters | Mean Err | Max Err | Mean Iters | LS evals
-------+-------------+-------------+------------+---------
5 | 9.0740e-01 | 5.0045e+00 | 5.00 | 22123
10 | 3.9506e-01 | 2.1927e+00 | 10.00 | 44879
20 | 1.2496e-01 | 6.8911e-01 | 20.00 | 90341
40 | 1.2846e-02 | 6.9533e-02 | 40.00 | 182869
80 | 1.0288e-04 | 8.6457e-04 | 80.00 | 368312
160 | 5.9820e-09 | 5.0903e-08 | 160.00 | 738479
-------+-------------+-------------+------------+---------
Tolerance sweep (iterations = 100, warmstart):
Tol | Mean Err | Max Err | Mean Iters | Max Iters | Solver us | LS evals
-----------+-------------+-------------+------------+------------+-------------+---------
1e-04 | 1.1297e-02 | 8.9331e-02 | 34.88 | 51 | 131002.94 | 12052
1e-06 | 1.0907e-03 | 7.7468e-03 | 50.87 | 72 | 184172.44 | 16700
1e-08 | 1.1485e-04 | 1.0085e-03 | 66.82 | 91 | 232189.34 | 20194
1e-10 | 1.1357e-05 | 8.1547e-05 | 81.97 | 100 | 276114.42 | 23264
1e-12 | 3.7695e-06 | 2.8592e-05 | 90.47 | 100 | 299526.58 | 24964
0 | 3.5019e-06 | 2.8592e-05 | 100.00 | 100 | 2062208.36 | 456276
-----------+-------------+-------------+------------+------------+-------------+---------
Total solver time: 3185214.08 us, avg time per iter: 74.9445 us
Pipeline mode (consecutive mj_step, tolerance = 1e-8):
1000 steps, nv = 654
Steps/s : 380
us/step (total) : 2630.0
us/step (constr) : 2103.7 (80.0%)
CG iters/step : 63.28
LS evals/step : 190.75
us/iter : 33.24
================================================================
2/4: PRP+ + float64
================================================================
CG Convergence: 2humanoid100.xml
1000 Newton steps, 100 evaluation points
nv = 654, nq = 756
metric: ||qacc_cg - qacc_newton|| / ||qacc_newton||
Warmstart (tolerance = 0):
Iters | Mean Err | Max Err | Mean Iters | LS evals
-------+-------------+-------------+------------+---------
5 | 3.8533e-01 | 1.4285e+00 | 5.00 | 22228
10 | 2.0808e-01 | 9.9315e-01 | 10.00 | 44873
20 | 6.4978e-02 | 2.3410e-01 | 20.00 | 89349
40 | 5.2895e-03 | 2.1916e-02 | 40.00 | 179827
80 | 4.0188e-05 | 3.0010e-04 | 80.00 | 363740
160 | 3.2891e-09 | 3.5480e-08 | 160.00 | 733905
-------+-------------+-------------+------------+---------
No warmstart (tolerance = 0):
Iters | Mean Err | Max Err | Mean Iters | LS evals
-------+-------------+-------------+------------+---------
5 | 9.0740e-01 | 5.0045e+00 | 5.00 | 22590
10 | 3.9506e-01 | 2.1927e+00 | 10.00 | 45093
20 | 1.2496e-01 | 6.8911e-01 | 20.00 | 90393
40 | 1.2846e-02 | 6.9533e-02 | 40.00 | 182422
80 | 1.0288e-04 | 8.6457e-04 | 80.00 | 367264
160 | 5.9811e-09 | 5.0903e-08 | 160.00 | 739556
-------+-------------+-------------+------------+---------
Tolerance sweep (iterations = 100, warmstart):
Tol | Mean Err | Max Err | Mean Iters | Max Iters | Solver us | LS evals
-----------+-------------+-------------+------------+------------+-------------+---------
1e-04 | 1.1325e-02 | 8.9941e-02 | 34.95 | 52 | 129456.81 | 12060
1e-06 | 1.0910e-03 | 7.7469e-03 | 50.85 | 72 | 181004.51 | 16687
1e-08 | 1.1488e-04 | 1.0085e-03 | 66.83 | 91 | 228183.13 | 20189
1e-10 | 1.1401e-05 | 8.1547e-05 | 81.98 | 100 | 269635.40 | 23259
1e-12 | 3.8040e-06 | 2.8592e-05 | 90.52 | 100 | 293811.25 | 24967
0 | 3.5543e-06 | 2.8592e-05 | 100.00 | 100 | 2051927.47 | 456000
-----------+-------------+-------------+------------+------------+-------------+---------
Total solver time: 3154018.57 us, avg time per iter: 74.1895 us
Pipeline mode (consecutive mj_step, tolerance = 1e-8):
1000 steps, nv = 654
Steps/s : 382
us/step (total) : 2616.6
us/step (constr) : 2091.8 (79.9%)
CG iters/step : 63.57
LS evals/step : 193.35
us/iter : 32.91
================================================================
3/4: HZ + float32
================================================================
CG Convergence: 2humanoid100.xml
1000 Newton steps, 100 evaluation points
nv = 654, nq = 756
metric: ||qacc_cg - qacc_newton|| / ||qacc_newton||
Warmstart (tolerance = 0):
Iters | Mean Err | Max Err | Mean Iters | LS evals
-------+-------------+-------------+------------+---------
5 | 3.6748e-01 | 1.2281e+00 | 5.00 | 19239
10 | 2.0034e-01 | 6.8689e-01 | 10.00 | 39001
20 | 6.1972e-02 | 1.9859e-01 | 20.00 | 80112
40 | 4.0704e-03 | 1.5797e-02 | 40.00 | 168211
80 | 2.4380e-05 | 1.5803e-04 | 79.45 | 347735
160 | 7.7413e-07 | 4.4732e-06 | 157.27 | 704210
-------+-------------+-------------+------------+---------
No warmstart (tolerance = 0):
Iters | Mean Err | Max Err | Mean Iters | LS evals
-------+-------------+-------------+------------+---------
5 | 9.3385e-01 | 4.9648e+00 | 5.00 | 19272
10 | 3.6117e-01 | 1.9618e+00 | 10.00 | 37982
20 | 9.7490e-02 | 5.1451e-01 | 20.00 | 76502
40 | 9.5924e-03 | 5.5088e-02 | 40.00 | 162782
80 | 6.7689e-05 | 5.1113e-04 | 79.91 | 344281
160 | 1.5541e-06 | 7.6955e-06 | 157.30 | 697076
-------+-------------+-------------+------------+---------
Tolerance sweep (iterations = 100, warmstart):
Tol | Mean Err | Max Err | Mean Iters | Max Iters | Solver us | LS evals
-----------+-------------+-------------+------------+------------+-------------+---------
1e-04 | 1.5891e-02 | 1.2929e-01 | 32.56 | 50 | 136254.00 | 10980
1e-06 | 1.5719e-03 | 1.0990e-02 | 47.42 | 68 | 193566.00 | 15418
1e-08 | 1.6260e-04 | 1.0680e-03 | 62.70 | 86 | 252661.00 | 20162
1e-10 | 1.5664e-05 | 1.0999e-04 | 78.10 | 100 | 311535.00 | 24509
1e-12 | 2.8152e-06 | 1.5236e-05 | 90.39 | 100 | 356814.00 | 27902
0 | 2.4989e-06 | 1.5025e-05 | 99.05 | 100 | 1980580.00 | 436825
-----------+-------------+-------------+------------+------------+-------------+---------
Total solver time: 3231410.00 us, avg time per iter: 78.7726 us
Pipeline mode (consecutive mj_step, tolerance = 1e-8):
1000 steps, nv = 654
Steps/s : 349
us/step (total) : 2862.7
us/step (constr) : 2379.3 (83.1%)
CG iters/step : 61.97
LS evals/step : 199.01
us/iter : 38.39
================================================================
4/4: PRP+ + float32
================================================================
CG Convergence: 2humanoid100.xml
1000 Newton steps, 100 evaluation points
nv = 654, nq = 756
metric: ||qacc_cg - qacc_newton|| / ||qacc_newton||
Warmstart (tolerance = 0):
Iters | Mean Err | Max Err | Mean Iters | LS evals
-------+-------------+-------------+------------+---------
5 | 3.6753e-01 | 1.2281e+00 | 5.00 | 19052
10 | 2.0028e-01 | 6.8689e-01 | 10.00 | 38761
20 | 6.1737e-02 | 1.9863e-01 | 20.00 | 79937
40 | 4.0915e-03 | 1.5821e-02 | 39.99 | 168159
80 | 2.4360e-05 | 1.5808e-04 | 79.59 | 348385
160 | 7.8367e-07 | 4.1549e-06 | 157.04 | 700760
-------+-------------+-------------+------------+---------
No warmstart (tolerance = 0):
Iters | Mean Err | Max Err | Mean Iters | LS evals
-------+-------------+-------------+------------+---------
5 | 9.3385e-01 | 4.9648e+00 | 5.00 | 19494
10 | 3.6117e-01 | 1.9618e+00 | 10.00 | 38480
20 | 9.7485e-02 | 5.1451e-01 | 20.00 | 77213
40 | 9.5904e-03 | 5.5078e-02 | 40.00 | 162472
80 | 6.7647e-05 | 5.1087e-04 | 79.87 | 342990
160 | 1.4979e-06 | 7.2291e-06 | 157.92 | 699052
-------+-------------+-------------+------------+---------
Tolerance sweep (iterations = 100, warmstart):
Tol | Mean Err | Max Err | Mean Iters | Max Iters | Solver us | LS evals
-----------+-------------+-------------+------------+------------+-------------+---------
1e-04 | 1.5998e-02 | 1.3172e-01 | 32.49 | 50 | 135111.00 | 10953
1e-06 | 1.5878e-03 | 1.1052e-02 | 47.33 | 67 | 190914.00 | 15418
1e-08 | 1.5901e-04 | 1.0680e-03 | 62.65 | 84 | 250609.00 | 20215
1e-10 | 1.5953e-05 | 1.1116e-04 | 78.01 | 100 | 307067.00 | 24562
1e-12 | 2.8520e-06 | 1.5174e-05 | 90.27 | 100 | 353010.00 | 27931
0 | 2.5161e-06 | 1.5129e-05 | 99.39 | 100 | 1999478.00 | 438790
-----------+-------------+-------------+------------+------------+-------------+---------
Total solver time: 3236189.00 us, avg time per iter: 78.9045 us
Pipeline mode (consecutive mj_step, tolerance = 1e-8):
1000 steps, nv = 654
Steps/s : 298
us/step (total) : 3352.8
us/step (constr) : 2832.0 (84.5%)
CG iters/step : 68.43
LS evals/step : 226.33
us/iter : 41.39
```
PiperOrigin-RevId: 928590104
Change-Id: I1a96730f50f444d6141d8978feb3519009daf320
2026-06-08 08:54:07 -07:00
Alessio Quaglino
7a7dc7ccad
Add support for loading 1D flex components from OBJ line segments.
...
The obj_decoder plugin is updated to parse line segments ('l') from OBJ files and represent them as degenerate triangles. The user_flexcomp compiler now supports flex dimensions of 1, using these parsed line segments to define the 1D flex elements. The compile sample's error reporting is also improved.
PiperOrigin-RevId: 928566870
Change-Id: I6920729d1b1d5aeb391401c3245ebb1d4784c190
2026-06-08 08:03:30 -07:00
Yuval Tassa
ea2d785e0a
Improve quality of maxhullvert coarse convex hulls using Qhull's Q9 option.
...
PiperOrigin-RevId: 928417339
Change-Id: I59ecd454f063f2e32e1c3ce08eb4a18506ddf8c8
2026-06-08 01:56:24 -07:00
Yuval Tassa
7b9b88060e
Refactor mj_fullM. This change is part of the deprecation of mjData.qM.
...
PiperOrigin-RevId: 925669464
Change-Id: I4889c66591bc1df4c31135a13776052aad491f7a
2026-06-02 17:22:55 -07:00
Yuval Tassa
062b0f1ea6
Remove deprecated mju_{error,warning}_{i,s} functions.
...
PiperOrigin-RevId: 925204136
Change-Id: Ia877d08a135092db8037d04e6a237e81325a1d7c
2026-06-02 01:59:05 -07:00
Yuval Tassa
4548e81e4d
Rename efc_diagApprox -> efc_diagA.
...
The field now stores either an approximate or exact diagonal of the constraint matrix A, so the name is made more general.
PiperOrigin-RevId: 924244954
Change-Id: I62b2f76531fb88b7b3bf96e6769940197596702b
2026-05-31 04:54:11 -07:00
Yuval Tassa
cd6db9ebe2
Improve CG solver precision and stability under float32 via line search refactor
...
Fixes #2313
This CL combines two complementary improvements to the Conjugate Gradient (CG) solver, significantly improving numerical precision, stability, and efficiency, particularly in single precision (float32).
1. Line Search Cost Evaluation Refactor: Previously, solver improvement was calculated by subtracting absolute costs: cost(alpha) - cost(0). In highly converged states or single precision, this is susceptible to catastrophic cancellation. We refactor PrimalSearch to compute the cost delta directly, dramatically improving precision.
2. Improved Solver Termination Condition: Near the float32 precision limit, line search deltas can occasionally be slightly negative due to numerical noise. Previously, any value below m->opt.tolerance (including negative values) triggered termination, halting the solver and locking in destabilizing steps. We update the termination condition to require positive improvement (0 < improvement < m->opt.tolerance), allowing the solver to continue iterating and recover stability.
Together, these changes yield substantial improvements, see reduced tolerances herein.
PiperOrigin-RevId: 924229669
Change-Id: Ic0bbefaed090f3a8b1e79ab8d45422c3e86fb56c
2026-05-31 04:00:09 -07:00
Yuval Tassa
96bf8aea81
Move island-specific sparse matrices from arena to stack.
...
PiperOrigin-RevId: 923850345
Change-Id: I9683d7554b15b7cd8c45a8dce7814640aa266452
2026-05-30 03:09:46 -07:00
Kyle Bayes
b935d4153c
Add new mju_threadpool API function, and delete old threading API.
...
PiperOrigin-RevId: 922838541
Change-Id: Id9f7e0fb298ffde61fcc49a802dc78971858ce51
2026-05-28 10:11:44 -07:00
Alessio Quaglino
4c381635e1
Add mjs_makeFlex to the MuJoCo C and Python APIs.
...
- Add mjs_makeFlex C API that wraps mjCFlexcomp::Make(), creating
a flex with auto-generated bodies, joints, and equality constraints
from parameters (type, dim, dof, count, cellcount, spacing, scale,
radius, mass, inertiabox, equality, rigid, flatskin, elastic2d,
pos, quat, origin, file, vfs).
- Add Python binding body.make_flex() in specs.cc with keyword args.
- Refactor flex_spec_provision.py to use make_flex() instead of XML
string templating + separate spec + attach. Eliminates textwrap
dependency.
- Merge user_flexcomp into user_model BUILD target to resolve
circular dependency.
PiperOrigin-RevId: 922725304
Change-Id: Ice13787c45f3173407fec659f9590a6453bc65dd
2026-05-28 05:59:20 -07:00
Sam Haves
b9fb817af8
Lexically normalize resource path in mjz_decoder resource provider.
...
PiperOrigin-RevId: 922654438
Change-Id: Ieb46230a2aba46a5e711bc5b24aec982f71e56ca
2026-05-28 02:56:45 -07:00
Michael Moss
237c17e485
Update changelog for the 3.9.0 release.
...
PiperOrigin-RevId: 922002472
Change-Id: I92489261c59cff10b29def784698868e67aa43da
2026-05-27 02:47:19 -07:00
Alessio Quaglino
f6cd0234fd
Change tactile sensor normal component to report penetration depth.
...
The normal component of the tactile sensor now reports the maximum penetration depth at each taxel, instead of a derived normal force. The depth is negated so that positive values indicate penetration.
PiperOrigin-RevId: 921980899
Change-Id: Ide4103c0aff465e25a81cfdda650f6a0e2da9e0b
2026-05-27 02:00:34 -07:00
Yuval Tassa
393c1e4217
Migrate mjtByte to mjtBool for boolean-valued fields.
...
PiperOrigin-RevId: 921408093
Change-Id: Icb00457836359779f0f72fc02d6a7c0dc9f6bd23
2026-05-26 05:35:49 -07:00
Yuval Tassa
15d27b363f
Compile-time size assertions for MuJoCo basic types
...
PiperOrigin-RevId: 919107499
Change-Id: I07fcba4f33c77a2a1e68528dba6d399af94d0220
2026-05-21 09:55:04 -07:00
Yuval Tassa
2810edd27a
Rename mjtnum.h to mjtype.h, move enum types to mjtype.h
...
PiperOrigin-RevId: 919020039
Change-Id: I441295c0baa0b7456f78239fbd5478d32ffc07c1
2026-05-21 06:43:29 -07:00
Kyle Bayes
7174d33f08
Introduce mjPreContact, a minimal struct passed into the collision functions.
...
PiperOrigin-RevId: 918533795
Change-Id: I2b5af05c1479b25d5c2cfdc690321a26fce6ede6
2026-05-20 10:47:46 -07:00
Yuval Tassa
bdf00966f9
Add compiler timing diagnostics to mjsCompiler, printed by compile.cc
...
For example, `compile mujoco_menagerie/robotis_op3/scene.xml` now outputs
```
Compile 1 (cold cache):
total: 317.2 ms
assets: 284.8 ms (wall clock)
load: 616.1 ms
hull: 26.4 ms
poly: 137.8 ms
inert: 177.8 ms
bvh: 568.2 ms
octr: 1.6 ms
tex: 25.3 ms
other: 32.4 ms
Compile 2 (warm cache):
total: 79.9 ms
assets: 54.5 ms (wall clock)
load: 888.5 ms
hull: 0.0 ms
poly: 0.0 ms
inert: 0.0 ms
bvh: 0.0 ms
octr: 0.0 ms
tex: 21.4 ms
other: 25.3 ms
```
PiperOrigin-RevId: 917850214
Change-Id: Iaec86230bec0faf2e47820e20cbff61de5b2621e
2026-05-19 08:28:47 -07:00
Yuval Tassa
f712eed4ce
Allow flex sleeping
...
PiperOrigin-RevId: 917817500
Change-Id: Ia3bd5e52e7c2eaa3f70c81352d82c130b1d357f6
2026-05-19 07:15:27 -07:00
Yuval Tassa
71d1014e70
Add mjENBL_DIAGEXACT for exact constraint diagonal. Fixes #2472
...
PiperOrigin-RevId: 916932908
Change-Id: Id23ac39b5cd996afc52990719a4e07c0cc7de600
2026-05-17 16:47:54 -07:00
Taylor Howell
072125c49c
MJX (impl='warp'): nconmax -> naconmax
...
PiperOrigin-RevId: 915407157
Change-Id: Ie43c06164d6d942c2a4bb60b3d09fcb5c4c87a35
2026-05-14 06:52:45 -07:00
Yuval Tassa
c56d662d27
Update link to Newton physics engine in changelog.
...
PiperOrigin-RevId: 915262716
Change-Id: I801267e760b8b5eeb534f71b4789e5a7fb8c35b1
2026-05-14 00:01:06 -07:00
Yuval Tassa
7bfdbad80b
Make PGS solver constraint visitation order time-independent.
...
PiperOrigin-RevId: 914741347
Change-Id: I7889a42543e9a9f3ff883e25ee9eafaceedc29e1
2026-05-13 02:34:30 -07:00
Yuval Tassa
a4e49f2dff
Margin and gap redesign (breaking change)
...
PiperOrigin-RevId: 914329812
Change-Id: I905665e4c1965bdb8b90587e5b1277cfbfe5cce0
2026-05-12 09:43:43 -07:00
Michael Moss
688209574d
Update changelog for the 3.8.1 release.
...
PiperOrigin-RevId: 913578392
Change-Id: I7367ff9044fd52039cec8dd492b37df2153a6d7f
2026-05-11 02:14:58 -07:00
Sam Haves
3e960ba3d3
Fix mjcPhysics doc link in changelog.
...
PiperOrigin-RevId: 912053636
Change-Id: Ie711995e171ae9dc97766a82902ba6917b08cd79
2026-05-07 11:07:04 -07:00
Sam Haves
ec50260e26
Add mjs_getOriginSpec to retrieve the original spec of an element.
...
The new function mjs_getOriginSpec returns the mjSpec that was used to define a given mjsElement. Unlike mjs_getSpec, this value remains constant even after the element has been attached to a different model.
PiperOrigin-RevId: 911930951
Change-Id: Ia9cd79d9dfabc513d6121eadcffc5d41075224c9
2026-05-07 06:33:28 -07:00
Sam Haves
034167f4cd
Fix MjVfs changelog item accidentally placed in last release
...
PiperOrigin-RevId: 911908806
Change-Id: I44514152c2084ca39d8ef218d9f00de66448c3ac
2026-05-07 05:28:29 -07:00
Sam Haves
a501731089
Update multiccd default in mjcPhysics.
...
PiperOrigin-RevId: 911410939
Change-Id: Ia20b5be87f85c4662b71994dd824d90c6b98b3ed
2026-05-06 10:21:48 -07:00
Alessio Quaglino
b9c1877ecb
Project out rigid body modes from flex strain equality constraints.
...
Modify EigendecomposeStiffness to project out rigid body translations and rotations from the stiffness matrix eigenvectors. This prevents "ghost damping" from rigid body modes being incorrectly constrained. Update hollow_vs_solid.xml with solimp parameters for edge constraints. Adjust engine_core_constraint_test.cc to reflect the reduced number of equality constraints due to the projection.
PiperOrigin-RevId: 910631207
Change-Id: Ibaaa59bc030cfc6ae657d8f0d1b2a51002cc8d4e
2026-05-05 06:01:15 -07:00
Yuval Tassa
4ed69b5ce7
Randomize PGS constraint visitation order.
...
Total testspeed runtime for `2humanoids100.xml` reduced by 19.6% (49.5 -> 39.8s).
PiperOrigin-RevId: 910608140
Change-Id: Ided0ae5bdb8e4e8196f84e08354a9ae8cfa5b626
2026-05-05 05:10:26 -07:00