Commit Graph

120 Commits

Author SHA1 Message Date
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
Google DeepMind af4be63cd8 Add xmacros for MjSpec.
PiperOrigin-RevId: 922169069
Change-Id: I01426596e49196996dfa324d5ab3849a90de2e3a
2026-05-27 09:12:35 -07:00
Yuval Tassa 7667e7110e Introduce mjtBool for boolean types.
PiperOrigin-RevId: 920201340
Change-Id: I3b19c11a00357e06a1df08b8819832955c37f9ff
2026-05-23 09:13:54 -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 88a293b5e4 Update docs to correctly reference mjtype.h
PiperOrigin-RevId: 919071817
Change-Id: I829de7a22a49e6df604b0acf601a13f67ef5fbab
2026-05-21 08:44:11 -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
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
Michael Moss 2f5e5d3da1 Add documentation for mjpDecoder.
PiperOrigin-RevId: 905048609
Change-Id: I6342673cdc53b80406ad77fc95cb8bb5790a5df6
2026-04-24 08:38:31 -07:00
Yuval Tassa 6bf31cf68a Update Windows build notes.
PiperOrigin-RevId: 902480947
Change-Id: I69f099b3d7eabd6513a62e74e5ef697a5062e7b5
2026-04-20 01:13:17 -07:00
Yuval Tassa 239aa1f856 Minor updates to documentation across multiple sections.
PiperOrigin-RevId: 898652783
Change-Id: Idb671910c18ed3406722b8a1307f97ae9a194139
2026-04-13 10:54:28 -07:00
Sam Haves f2461f9ce6 Modify mj_PLUGIN_LIB_INIT to support multiple plugins in the same compilation unit.
Previously on MSVC we used DllMain to register plugins, you cannot have multiple definitions of DllMain in a single unit so you would get errors if you tried to register two plugins. This modifies the implementation to insert a function pointer into the C runtime initialization instead.

PiperOrigin-RevId: 896612678
Change-Id: I07732147b955d741c836acff6da986db0e9b9eff
2026-04-08 11:35:16 -07:00
Yuval Tassa 0c66585e39 Fix typos and minor corrections in MuJoCo documentation and comments.
PiperOrigin-RevId: 875163889
Change-Id: Ic604d6235bf9cb999058f191e3ee41e47ec1a567
2026-02-25 07:56:31 -08:00
Yuval Tassa 40e0007849 Restructure numeric constants table in API docs
Break the monolithic numeric constants table into 6 sub-grouped tables:
Version, Engine constants, Array sizes, Visualization, Rendering, UI constants.

Fix stale values: mjMAXUITEXT (500->300), mjMAXUIMULTI (20->35),
mjMAXUIEDIT (5->7), mjMAXUIRECT (15->25).

Add missing constants: mjMAXLIGHT, mjMAXMATERIAL.

Fix placeholder description for mjMAXFLEXNODES.

PiperOrigin-RevId: 875010581
Change-Id: Id47846de4d98b62cb96087b72ecd28358d5db9c7
2026-02-25 00:54:35 -08:00
Yuval Tassa c54f1fe380 Use semantic versioning.
PiperOrigin-RevId: 869102767
Change-Id: I8b01b9343289d4ad7d15bcc3634a28e661308a90
2026-02-12 02:11:20 -08:00
Yuval Tassa 6419534bad Add actuator and sensor delays. Fixes #1004
PiperOrigin-RevId: 866478839
Change-Id: Id21a6da0f98454c8fa39ea5af8a5e213d6eae497
2026-02-06 08:47:36 -08:00
Haroon Qureshi cb9a9c159c Remove getdir from mjpResourceProvider.
All known implementations were effectively the same as the default fallback. It was just adding unneeded complexity. Removing this now will help with upcoming improvements to resource providers.

PiperOrigin-RevId: 855163273
Change-Id: I529fc18d0d03a8dc676c909ec9e4b1da1454d414
2026-01-12 04:07:42 -08:00
Yuval Tassa 775c0698c3 MJCF schema: use responsive grids for attributes
PiperOrigin-RevId: 853263519
Change-Id: I79cb6e6208061d9546f0dca7a941838caa6b1a91
2026-01-07 08:00:16 -08:00
Yuval Tassa 4830f5a79e Add missing documentation for the asset cache.
Also improve `compile` sample timing logic and documentation.

PiperOrigin-RevId: 852855741
Change-Id: I9b2798208198ca68cf4cee9c968772954ada91c5
2026-01-06 11:07:42 -08:00
Yuval Tassa 3868ed0382 Improve XML schema usability
PiperOrigin-RevId: 852820889
Change-Id: I04eea45161f9e71f9ccf49afad57ff28fd099b35
2026-01-06 09:51:36 -08:00
Yuval Tassa b77977a962 Update Programming/simulation chapter.
PiperOrigin-RevId: 847424298
Change-Id: Icc6efb05dee5e67a5813ed04caa15a5703e59aee
2025-12-21 08:16:39 -08:00
Yuval Tassa 4896e698f6 Update "mjModel changes" section in simulation.rst
PiperOrigin-RevId: 838768328
Change-Id: I5c09186e52115df37e9412495ecc7dceddb2ed8a
2025-12-01 07:40:09 -08:00
Alessio Quaglino a0cb97eb4d Improve attach docs.
PiperOrigin-RevId: 834366494
Change-Id: I9086097990f09e848d0b76d9c22f4fd2bbd70718
2025-11-19 11:08:36 -08:00
Yuval Tassa 22c0b68903 Improve logic and documentation for sleeping sensors
PiperOrigin-RevId: 830891115
Change-Id: Ife8309b165c085b54c9f668d825d69ed12a9a8f0
2025-11-11 06:45:56 -08:00
Yuval Tassa 8734cab366 Add sleeping documentation
https://youtu.be/vct493lGQ8Q

PiperOrigin-RevId: 829390353
Change-Id: I92f85a03be0bb585d2d8e29de1ed1a2e848f247f
2025-11-07 05:12:42 -08:00
Taylor Howell 53360f51a9 Update .readthedocs.yml to install MuJoCo Warp in order to generate API documentation. Additionally, mirror mujoco_warp/pyproject.toml in mjx/mujoco/mjx/third_party/mujoco_warp.
PiperOrigin-RevId: 814656860
Change-Id: Ie4c0e9076c90b598dedc65a3e9793ed3d2375c37
2025-10-03 05:39:45 -07:00
Michiel Blokzijl ee777f74d3 Explain how to build Python and C/C++ sources from the same codebase.
The previous instructions use a pre-built binary from MuJoCo and do not cover
the use-case of building C/C++ and Python bindings from the same codebase.

PiperOrigin-RevId: 802060401
Change-Id: I6d0b9c7c2269ff596ac706b716ff6c95b42c5d99
2025-09-02 02:51:49 -07:00
Yuval Tassa 243c011ea0 Add note about performance and release builds.
PiperOrigin-RevId: 781460349
Change-Id: I7defa9bf31376afa31b32f26523e8ebd9da3fc0e
2025-07-10 03:40:25 -07:00
Yuval Tassa 18d5d5d03f Improve documentation related to mjSpec element deletion.
PiperOrigin-RevId: 775677830
Change-Id: I02e51b57956b0b6a20c654326b54e001b498dd96
2025-06-25 07:23:51 -07:00
Taylor Howell de3dc7c234 Update documentation from mjData.solver_iter to mjData.solver_niter.
PiperOrigin-RevId: 763729137
Change-Id: I1266539ead38e083d427614d50b2aa79a68aa09c
2025-05-27 04:25:54 -07:00
Paweł Budzianowski c3e71a3fb1 Update simulation.rst 2025-05-06 16:46:46 -07:00
Alessio Quaglino a02a27d4a4 Combine all mjs_attach functions into one.
PiperOrigin-RevId: 742702092
Change-Id: I89e35c59ada017cd061e2031584eeea71776743d
2025-04-01 08:05:58 -07:00
Alessio Quaglino 019e0a806c Throw an error if a child attached by reference to a parent is compiled.
Fixes #2482.

PiperOrigin-RevId: 735665098
Change-Id: Ia3436fdd2ff572f8f0c1ded434742a4a9186f2f7
2025-03-11 01:24:17 -07:00
Kyle Bayes ed16f2daf2 Set nativeccd as default.
PiperOrigin-RevId: 731343200
Change-Id: I315779017b676f3d118e0d38ee53a515272f50b8
2025-02-26 09:15:15 -08:00
Yuval Tassa f554b38c36 Fix syntax bug in simulation.rst
PiperOrigin-RevId: 729710215
Change-Id: I49899ed50d5e97a2c5ad35e5de2e93186b7c64ec
2025-02-21 17:28:59 -08:00
Yuval Tassa fb07e0d1f7 Convert qLD to CSR format.
PiperOrigin-RevId: 728196818
Change-Id: I31bdf32e251293284426ed345019f27fd051a0e1
2025-02-18 07:14:45 -08:00
Yuval Tassa f73f0e1d0d Fix aspect ratios of embedded videos in docs.
Note that small videos, for some reason, need an aspect ratio that is different  from the actual aspect ratio.

PiperOrigin-RevId: 724879307
Change-Id: I681f071baf4eb09cfda41edeca0d1ee16be4181a
2025-02-09 03:33:10 -08:00
Yuval Tassa 8c22181156 Fix documentation typos.
PiperOrigin-RevId: 720232771
Change-Id: I176db4d4168c37b2819df14b439c4cde838e2025
2025-01-27 10:58:22 -08:00
Google DeepMind 4ab274aea9 Fix missing arg for mj_compile in model-editing doc example code.
PiperOrigin-RevId: 720005405
Change-Id: Idf71a1a12fe4cfcc450cd80c91b13ee8a75e1636
2025-01-26 20:25:50 -08:00
Alessio Quaglino c2138c3fb0 Do not copy the spec during attach.
Use a reference count for managing the memory.

PiperOrigin-RevId: 716169486
Change-Id: Id270c4858c17b9250115e9544d5ea143584e2d5f
2025-01-16 03:53:17 -08:00
Copybara-Service 6f7fba794b Merge pull request #2336 from xela-95:patch-2
PiperOrigin-RevId: 713991183
Change-Id: I0869a068f463513e89fe2f88bca4b82177cfffa3
2025-01-10 03:46:20 -08:00
Yuval Tassa b0f885ead0 Minor edits to the Programming/Simulation docs page.
PiperOrigin-RevId: 713952376
Change-Id: I5b7230a001bd49954d401846f40cd122ee4e748c
2025-01-10 01:11:27 -08:00
Alessio Quaglino 6654d63438 Add spec lookup in the attached spec array using the compiler option pointer.
This enables to find the spec associated with the compiler option stored in the objects, which do not necessarily belong to the model that owns them.

PiperOrigin-RevId: 713259419
Change-Id: I579c770147ff07ed2a5edd20e7a795ee7cc27147
2025-01-08 05:44:00 -08:00
Alessandro Croci 7a6bf06706 Update simulation.rst
Add missing backticks to `mjData.xfrc_applied`
2025-01-08 14:27:46 +01:00
Alessandro Croci 661c3e01dc Update simulation.rst
Add missing backticks to `mjData.mocap_quat` in simulation.rst
2025-01-08 14:21:24 +01:00
Yuval Tassa b6037d1759 Improve mjSpec documentation. Fixes #2074.
PiperOrigin-RevId: 692251710
Change-Id: Ia46bbbe5b7eaa890433b38fed66824f716cc9ea0
2024-11-01 12:06:14 -07:00
Yuval Tassa 32df8a515a Fix typos. fixes #2139
PiperOrigin-RevId: 691429879
Change-Id: I929b7a387ec41f68b8d85fe20de83083216da36a
2024-10-30 08:34:39 -07:00
Yuval Tassa 6703a40fcf Improve plugin documentation.
PiperOrigin-RevId: 690974299
Change-Id: Iadaabafb7434ada9579d6e2f64aae435cdfedbd8
2024-10-29 05:07:31 -07:00
Yuval Tassa 3d920e6a70 Update build documentation to include instructions on how to build the docs locally.
PiperOrigin-RevId: 690616910
Change-Id: I717988e3adc67cb6d65488d39bc804c3d4f0e3b5
2024-10-28 08:17:16 -07:00
Yuxuan Jiang 55962538c4 Fix typo in programming documentation 2024-09-24 15:33:27 +08:00